You'd think this would be an obvious question that I wouldn't have to ask, but apparently I do because in the documentation for this they say two things that seem to be contradictory. First:
This method can only return up to 3,200 of a user's most recent statuses.
Second:
count: Specifies the number of tweets to try and retrieve, up to a maximum of 200.
So is it actually possible to get 3200 of a user's tweets? If so, how?
The user_timeline itself contains up to 3,200 possible statuses.
By default, when you make a request to the user_timeline API it will give you 20 results per page. With the count parameter, you can ask for up to 200 results per page.
To retrieve all 3,200 statuses in a user_timeline, you'll need to paginate through each page of results. For 3,200 tweets at 200 tweets per page, that's 16 pages (and requests) to fetch all the results.
Keep in mind that the count parameter is really an "up to" parameter in the Twitter API -- you may sometimes get less results per page depending on a few circumstances. Be sure and use include_rts=true to include retweets in the result set for more consistent pagination.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With