Search code examples
asp.net-web-apistreamingreal-timetweetinvi

Real time Tweetinvi Streaming in Web API


Has anyone ever made a streaming application in ASP.NET Web API with Tweetinvi? I have to do a application where I connect to a Twitter Stream and track a specific hashtag. How do I properly authenticate and how do I open many streams for many users? Does anyone have a good tutorial (NO Console Applications please)?


Solution

  • I have not created any tutorial for ASP.NET streaming as I usually focus on providing more feature.

    But I have done that in the past. The best solution is to use Websocket with SignalR for example and push the information every time and information is received.

    If you want to do that for multiple users be careful to create your threads outside of the ThreadPool or you might end up reaching its limit.

    It is planned to provide an example in Examplinvi.Web but I won't do that before I have completed version 1.3.

    In the meantime I would suggest you look at the work of adam on the subject: https://github.com/adaam2/tweetinvi/tree/master/Examplinvi.Web.

    Note that it was for an old version of Tweetinvi but you can still use the same logic behind it.

    Cheers, Linvi