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

New Post: Simple stream not stopping when asked

$
0
0
Hi linvi,

I tried your suggestion, it didn't work (the method never gets to the lines of code after this one).
this is my code:
_SimpleStream.StartStream(_Token, tweet =>
            {
                if (_Tweets.Count < iNumTweets)
                {
                    if (tweet.Hashtags.Count > 0 && tweet.Text.StartsWith("RT") 
                                                && tweet.Retweeting != null)
                    {
                        if (tweet.Retweeting.RetweetCount > 1)
                        {
                            _Tweets.Add(tweet.Retweeting);
                        }
                    }
                }
                else
                {
                    _SimpleStream.StopStream();
                }
            });
_Tweets is a member of the class.
_Token is a member of the class.
iNumTweets is the number of wanted tweets (consider it a constant).

Can you say if something is wrong with it ?
I'm using Tweetinvi 0.8.3.22

Thanks,

Yossi.

Viewing all articles
Browse latest Browse all 4126

Trending Articles



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