Question

I'm using Spring.NET Twitter extensions in an application. Instead of querying in a loop for twit updates (pulling), I just want to listen to twits of interest (hashtags, @ mentions, keywords or updates in timeline) and receive push notifications as they come. So I think the way to do it is to use an event model such as Observables, however, I can't find anything in the API to handle this nor any samples to demonstrate it. I would appreciate if anyone can put me in the right direction for this functionality. Thanks.

Was it helpful?

Solution

Spring Social Twitter only recently started supporting Twitter's streaming API. But that's for Java and your question is about SpringSocial.NET. I doubt that SpringSocial.NET has support for this yet. But I'll ping Bruno (the SpringSocial.NET project lead) and see if he can chime in here.

Until SpringSocial.NET supports Twitter's streaming API, your options are to continue polling (which is non-ideal due to rate limiting concerns) or to implement streaming support on your own. I'm sure Bruno wouldn't mind a pull-request to add streaming support to his project. :)

To be clear, SpringSocial.NET is not the same project as Spring Social and the two projects are only loosely related (in that I know who to email if there's ever a question about SpringSocial.NET).

OTHER TIPS

Rx will just allow you to expose Push based API nicely. If the API does not support Push then you could use Rx to Fake Push by doing polling but expose it as if it was push (Observable.Interval or Schedulers etc).

You first will need to find how Twitter exposes Push based notifcations. If your Client (Spring.NET Twitter Ext) does not support this you are stuck with polling (via Rx or not).

It appears that you want to look at Twitter Streams API (https://dev.twitter.com/docs/streaming-apis)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top