This project has moved. For the latest updates, please go here.

Querying the Home Timeline

Oct 19, 2013 at 8:48 AM
Hi ,

The documentation says that :
Gets the 20 most recent statuses, including retweets, for a user and user's friends.
This query returns the tweets and retweets shown on a user's home page when they log into Twitter.

The maximum number of tweets/retweets returned is 800.

But when i write for example :
  var tweets =
                from tweet in twitterCtx.Status
                where tweet.Type == StatusType.Home && tweet.Count == 250
                select tweet;
I don't receive 250 tweets but 200 .

How can i to get more tweets from the Timeline?

Thank you very much !
Oct 19, 2013 at 9:11 AM
Hi Mogador,

This is a little bit tricky because you're working with three different numbers. Here's a quick summary:
  1. If you don't specify the count, it defaults to 20.
  2. The maximum number of tweets you can receive is 200 on a single query. If you specify 250, you will still only receive 200.
  3. The maximum number of tweets you can receive via multiple queries is 800.
So, this says that if you set count, you can only set it to 200, but if you don't set count it will default to 20.

To get the 800 tweets, you'll have to page through the timeline. I've written a blog post, Working with Timelines with LINQ to Twitter, that explains how to get more than 200 tweets. Essentially, you use the SinceID, MaxID and Count (set to 200) to obtain multiple pages. Be sure to read the Twitter documentation that I've linked to for help in understanding why this makes sense.

Oct 19, 2013 at 2:41 PM
ok , thank you very much !