retreive a tweet ID when creating a new tweet

Hi Experts,

I use the twitteroauth PHP script of Abraham Williams for creating tweets from my code. Now I want to be able to keep track of them and store there unique ID in my database. In this way I can delete them again as well.

In lot of posts I've found his simple line of code extracting the id from the status object.

$twitterID = $status ->id;

But it returns a value like:

1.45605389147E+17
 
but the real tweet ID is:

145605389147316224

Can someone explain this to me? And help me to get the real code?


Thanks,

LVL 1
SteynskAsked:
Who is Participating?
 
SteynskAuthor Commented:
I solved it my selve.

$twitterID = $status->id;  

Results in a 64-bit twitter id

I should us:

$twitterID = $status->id_str;

And it solved it
0
 
SteynskAuthor Commented:
Solved my own problem
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.