Start a new FilteredStream for new keywords

Dec 22, 2013 at 2:18 PM
Hi,

Let's say I've started a FilteredStream and added a tracked keyword. As the tweets received, I want to create additional FilteredStreams for the mentioned hashtags.

As stopping, adding new keywords, and starting the stream doesn't help, So, I've decided to write a wrapper around FilteredStream but cannot figure out how to create a stream in the eventhandler. (I did something but I get ArgumentNullException at GetTweetFromJson, so I guess there is something I miss)

Can anyone help?
Coordinator
Dec 22, 2013 at 11:23 PM
Hi,

Normally stopping a stream and adding filters should allow you to get the new filters to be applied as soon as the next Start call.
I cannot look at this issue today but I will try to do this tomorrow. In the meantime, would you please give me the keywords you are trying to filter.

Kind Regards,
Linvi
Dec 22, 2013 at 11:29 PM

Thanks J Keywords are irrelevant but I start with "TarihiYolsuzlukveRüşvetSkandalı", "BüyükRüsvet", "MerhabaGencleerleCumartesiTakibi", "AllahaHavaleEdiyoruz".

After the stream initialized and I receive tweets, I enumerate hashtags and want to start a stream for each one. That’s where I start to get exceptions…

Coordinator
Dec 22, 2013 at 11:33 PM
If you do not mind, would you please send me the piece of code starting the new streams from hashtags. It would ease my debug.
You can send this in this discussion or by using the contact form of my profile if you prefer this to be private.

Thanks,
Linvi
Dec 23, 2013 at 6:42 AM

I sent you a message from contact form.

BTW, I think this is not possible: I tried to run two instances of normal working apps and only last survives. The first app just stops there, maybe twitter pauses it.

Thanks

Coordinator
Dec 24, 2013 at 12:22 AM
Hi,

I got the same problem you faced and I consequently searched for the issue which is in fact a limitation of the Twitter Stream API.

"Each account may create only one standing connection to the public endpoints, and connecting to a public stream more than once with the same account credentials will cause the oldest connection to be disconnected. Clients which make excessive connection attempts (both successful and unsuccessful) run the risk of having their IP automatically banned."

https://dev.twitter.com/docs/streaming-apis/streams/public

Consequently, I cannot do anything to prevent this error from happening.

In the meantime, UserStream are not limited to a specific number of connections but should still be limited in their usage.

Kind Regards,
Linvi
Marked as answer by linvi on 1/16/2014 at 2:28 AM