Quantcast
Channel: Tweetinvi a friendly Twitter C# library
Viewing all articles
Browse latest Browse all 4126

New Post: Streaming API

$
0
0
Hello here,

The fact that your program freezes is normal. When you use the Stream api you need to invoke it in a specific thread.
var stream = Stream.CreateFilteredStream();
stream.MatchingTweetReceived += (sender, args) =>
{
    var tweet = args.Tweet;
    Console.WriteLine(tweet.Text);
};
var thread = new Thread(() => stream.StartStreamMatchingAllConditions());
thread.Start();
Of course, you will need to set your credentials as explained by Insafq.

Please let me know if this is of any help.
Regards,
Linvi

Viewing all articles
Browse latest Browse all 4126

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>