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

New Post: Best Practise for contiguous collection

$
0
0
I am considering doing something along the lines of
                Dim lngMaxID As Long = 500000000000000000
                Dim searchParameter As ITweetSearchParameters = Search.GenerateSearchTweetParameter("obama")
                Do
                    searchParameter.MaxId = lngMaxID - 1
                    tweets = Search.SearchTweets(searchParameter)
                    lngMaxID = tweets(tweets.Count - 1).Id
                Loop While tweets.Count > 0
But I run out of SearchTweetsLimit rather quickly. I then get a "Object reference not set to an instance of an object." exception once the SearchTweetsLimit reaches 0. It would be nicer to get a specific exception for this.

What is best practise ? Should I be calibrating my read loop to the rate limits for example? i.e. set the number of Tweets and the poll interval such that the rate limit will not be exceeded?

How have others approached this ?
Thanks

Viewing all articles
Browse latest Browse all 4126

Trending Articles



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