Hi Grace, Be default the API returns the most recent Tweets/ReTweets created by users being followed by the authenticating user. When you pass a since_id to the home_timeline method this means the API will return to you the 20 most recent Tweets created since that ID. What this means is you won't necessarily find the Tweet with an ID equal to since_id being returned in your request.
To go further back in time you must also pass a max_id with the request. This changes the API request from: "All Tweets in the home timeline since since_id" to "All Tweets in the home timeline created since since_id and up to max_id" A few examples may help demonstrate this. In all cases assume the timeline contains Tweets with IDs 1 to 1000, and that count for our requests will always be 20. Request: /1/statuses/home_timeline.json?since_id=1 Response: Tweets 1000 to 980. Request: /1/statuses/home_timeline.json?since_id=900&max_id=1000 Response: Tweets 1000 to 980. Request: /1/statuses/home_timeline.json?since_id=900&max_id=950 Response: Tweets 950 to 930. Request: /1/statuses/home_timeline.json?since_id=1&max_id=50 Response: empty -- this is because home_timeline only has access to the last 800 Tweets Request: /1/statuses/home_timeline.json?since_id=200&max_id=250 Response: Tweets 250 to 230. Hope that helps, @themattharris <https://twitter.com/intent/follow?screen_name=themattharris> Developer Advocate, Twitter On Wed, Jun 15, 2011 at 11:15 PM, Grace <[email protected]> wrote: > hello everyone.. > > I try to get tweets from user's home using home method. > > http://api.twitter.com/version/statuses/home_timeline.format > > If I use paging and set as the following.. > > Example. > > paging.setSinceId(000009L); > > What would be the expected result returned from API ? > > in my home, there will be like following tweets. > **************************************************** > 000050( The most recent one) > .... > 000040 > 000039 > ..... > 000023 > 000022 > 000021 > 000020 > ...... > 000013 > 000012 > 000011 > 000010 > ...... > 000003 > 000002 > 000001 > ************************************************** > > Actually, I should receive Tweets ( 000010 to 000020 ) . right? > > but, when I called the API, it seems like the returned result is > ( 000030 to 000050). > > Is it the correct way of working API ? or do I miss something? > > If I want to get Tweets ( 000010 to 000020 ) , how can I do it? > > Regards, > Grace > > -- > Twitter developer documentation and resources: https://dev.twitter.com/doc > API updates via Twitter: https://twitter.com/twitterapi > Issues/Enhancements Tracker: > https://code.google.com/p/twitter-api/issues/list > Change your membership to this group: > https://groups.google.com/forum/#!forum/twitter-development-talk > -- Twitter developer documentation and resources: https://dev.twitter.com/doc API updates via Twitter: https://twitter.com/twitterapi Issues/Enhancements Tracker: https://code.google.com/p/twitter-api/issues/list Change your membership to this group: https://groups.google.com/forum/#!forum/twitter-development-talk
