views:

267

answers:

2

I'm using Zend_Service_Twitter to run a Twitter search and return json. I'm having a problem with the since_id values I'm getting back. When I print_r() the search results, I get back the following:

...
[since_id] => -2017847207  
[refresh_url] => ?since_id=6801825835&q=myTwitterSearchQuery
...

The [since_id] value is different to the querystring since_id - this means that the next search I run using the stored since_id doesn't return anything.

Anyone have suggestions on what might be causing this?

Thanks.

+1  A: 

It's a logged bug in Zend_Service_Twitter. That bug report lists the spots where you'd want to not cast to int.

great_llama
+1  A: 

This is most likely related to The Twitpocalypse that happened back in June. Although I'm suprised Zend hasn't taken care of this. But basically Twitter's id has gone over the max for signed integers and you are overflowing. You should switch to storing this some other way. Since php may make this difficult that you might just want to store them as strings.

Thomas Sidoti