The Twitter seach API returns a JSON object, a.o. containing the unique id of a tweet:
[id] => 2.9851634017882E+17
[text] => foobar
I have created a MySQL bigint(20) field in my database to store the id’s. However, when I try to store the id, in the database it only says 2 in (in this instance).
What am I doing wrong?
For every id in the call, I would recommend an approach of converting the value to a string before sending it over to PHP.
I’m doing this with my own webapp and it works great. I faced the exact same issue with the API.
ex. using jquery with the Twitter API
also make sure your capturing the
id_strvalue and not theidvalue.id_stris perferred overidand is less error prone when dealing with larger id’s.