How to make the Twitter API returns me over 800 tweets

1k views Asked by At

How to make the Twitter API (home_timeline) returns me over 800 tweets? For example applications like tweetbot how do it to have more updates in the 3000 home timeline? I think that using a cache system but which one?

1

There are 1 answers

5
Tom On BEST ANSWER

You can not get more then 800 tweets in 1 go.

But you can pass parameters like since_id and max_id: https://dev.twitter.com/rest/reference/get/statuses/home_timeline

If you store the oldest tweet id => and in the next api call you pass in that id, then you will get the older ones. After that you just repeat the cycle.

For example: tweet id 500 of date 20/6/2015 is your oldest entry. => max_id: 500 Will return tweets 499, 498, ... which are all older then 20/6/2015