Using since_id correctly


#1

Hi guys,

I’m polling the REST API with URL’s that look like this:

https://api.twitter.com/1.1/statuses/user_timeline.json?screen_name=pbmclain&since_id=281847878555672576

https://api.twitter.com/1.1/statuses/user_timeline.json?screen_name=piercelamb&since_id=33963349272305664

With the goal of getting every tweet that’s occurred SINCE that ID. On the former URL, no new tweet should have occurred and on the latter, one new tweet has occurred, yet both URLs return a bunch of old tweets.

As one example, you can clearly see that this is user pbmclain’s latest tweet: https://twitter.com/pbmclain/status/281847878555672576 (and that tweet ID matches the since_id i passed)

Yet what I get back from the API is:

List(Twits(Some(355381939772985346),None,Some( And just for completeness I present: http://t.co/Ff7M2l2LNa)), Twits(Some(355377232404951040),None,Some( http://t.co/itCTO8qsLB)), Twits(Some(355375834946740224),None,Some(He was at ECOOP and didn’t get back until that evening.)), Twits(Some(355375288726720512),None,Some( Don’t forget @timfelgentreff who wasn’t present for the picture! Very important part of the team.))),)

Which represent a bunch of old tweets.

Thank you for any advice


#2

If you go to https://twitter.com/pbmclain and click on “Tweets & replies” you will see that 5 tweets have been created after the one specified in since_id.

And the since_id you are using for @piercelamb is their first tweet so all of their tweets comes after.