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:

but the real tweet ID is:


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


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
SteynskAuthor Commented:
Solved my own problem
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.