user_timeline with since_id - I set a low value and expect to get the 1st available tweets, but get the latest


#1

I make a call to user_timeline (eg https://api.twitter.com/1.1/statuses/user_timeline.json?screen_name=screenname&since_id=1&count=200) and expect to get the 1st available 200 tweets, but instead I get the latest 200 (just as I get with https://api.twitter.com/1.1/statuses/user_timeline.json?screen_name=screenname&count=200).

According to https://dev.twitter.com/docs/api/1.1/get/statuses/user_timeline “if the limit of Tweets has occured since the since_id, the since_id will be forced to the oldest ID available” - but that does not seem to be the case? Bug or feature? (Or my fault…?)


#2

There is no easy way to get the oldest tweets available for a user.
Let’s say that @user1’s first tweet has id 11111, and the oldest of his tweets that you can get has the id 55555. With since_id=1 you are asking the tweets between tweet 11111 and his latest tweet. As explained in the doc, since_id automatically become the oldest ID available, meaning 55555 in my example. So it is as if you were asking the tweets between tweet 55555 and his latest tweet.
However, statuses/user_timeline always returns the most recent tweets in the range requested, meaning that since_id=1 doesn’t do anything.
To get older tweets you have to specify a max_id.