Why is since_id always zero


#1

Here is the query

https://api.twitter.com/1.1/search/tweets.json?q=love

I want to make a query like above, save since_id_str and use it to request older tweets like this

LAST_SINCE_ID =
https://api.twitter.com/1.1/search/tweets.json?q=love&max_id=LAST_SINCE_ID

And repeat…

But since_id is always zero this doesn’t work.

Thanks, Jonas


#2

Sorry, I just re-submitted this question under a new title, “Search API paging with max_id and since_id.” It took 21 hours for this question to appear and I just gave up on it.


#3

(Somethings screwy with this discussion board. Not all my posts are showing up.)

Just to clarify, I want to implement pagination with max_id and since_id. But, it is not working because since_id is ALWAYS zero. Am I misusing since_id? Why is since_id zero?

Jonas


#4

So, I got around this problem by using the id of the last status returned and using this id for the max_id param in my next query.

But, I’m still curious why since_id does not contain the id of the last status returned, or what it’s purpose is.


#5

Hi there,

The “since_id” key/value pair you’ll find in the metadata section of Search results is more of an indicator as to what you passed in – if you provided no since_id, it will be zero.

Your method of leveraging the existing tweet IDs is correct. This type of timeline navigation is detailed in [node:6213].


#6

is there an acutal example of how to do this? like some code?