Get the old tweets for Twitter usertimeline API using MAX_ID



Hi All,

I have been struggling for past 3 days to get the data from Twitter User Timeline API.

I’m trying to pull the tweets on user Timeline for last one year. I have created tokens and keys in twitter application. Using OAuth I have generated the signature using Since_id for the first time.
I have specified the Last year’s tweetID in Since_id

For the first time, I was able to pull the data for the most recent days (i.e. 29th, 28th and 27th september) and I almost got 3200 tweets and stored in a text file.

For the second time, I have taken the last Tweet ID from the twitter data file and passed it as max_id along with other request parameters like Screen_name, Count and Since_id. I’m getting a single record. I have verified manually in the twitter for the screen name and it’s having data. I have tried all the combinations in the request parameters.

How to get the old tweets for Twitter usertimeline API ?

Can any one help me to resolve this issue ?



The timeline API is limited to a maximum of 3200 Tweets. This is expected behaviour per the documentation.

This method can only return up to 3,200 of a user’s most recent Tweets. Native retweets of other statuses by the user is included in this total, regardless of whether include_rts is set to false when requesting this resource.


Thank you very much.
I thought it is only limited to a single API call.