I have not seen this issue discussed anywhere yet. Recently my twitter search API code stopped working properly (using search.json). After tracking down the issue here is what I think is going on:
- Recently, the status/message IDs returned by the search API began exceeding the maximum positive integer allowed on 32-bit OS platforms (2,147,483,647). For example, in a recent API call I am getting message IDs such as 3,448,308,315. - The twitter API returns these within the JSON string using integer encoding. From PHP, when I decode the return JSON string using json_decode on 32-bit Windows, I end up with ID values such as -958,581,221 rather than 3,xxx,xxx,xxx. - This causes a problem for both message IDs and the max_id parameter which is required to get further pages of results. - At the moment I cannot find a way to get the proper ID out of the JSON payload without manually changing the raw JSON encoded string I get back from twitter to force the IDs to be encoded as strings rather than integers. This involves several search and replace operations and thus is very inefficient. - One alternative may be to switch to ATOM but I hoping to avoid that as JSON is compact and works well. - Ideally the JSON API could return the IDs using a string rather than integer encoding Has anyone seen this and does anyone else have any ideas on how to work around it?
