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

New Post: TweetSharp Vs TweetInvi get home timeline

$
0
0
I don't think TweetSharp can get more than 3200 tweets from the user timeline.

The Twitter documentation specify the limit of 3200 tweets for User Timeline
https://dev.twitter.com/rest/reference/get/statuses/user_timeline

The Twitter documentation specify the limit of 800 tweets for Home Timeline
https://dev.twitter.com/rest/reference/get/statuses/home_timeline

If TweetSharp can do this, it means that Tweetinvi can do it too (I have not tested right now). The reason is that Tweetinvi is not limiting the number of tweets you can retrieve, but Tweetinvi is limited by the results returned by Twitter.

Concerning pages and timelines, you simply have to specify the MaxId in the TimelineParameter, and the paging will be done for you.
// Paging and Timelinevar user= User.GetUserFromScreenName("Tweetinvi.NET");
var tweets1 = Timeline.GetUserTimeline(user, 3200);
            
var requestParameter = Timeline.CreateUserTimelineRequestParameter(user);
requestParameter.MaxId = tweets1.Min(x => x.Id) - 1;
requestParameter.MaximumNumberOfTweetsToRetrieve = 3200;
var tweets2 = Timeline.GetUserTimeline(requestParameter);

var tweets = tweets1.Concat(tweets2);
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>