How to get the ID of a Retweet?


Hello, it’s been a long time that i’m trying to undo a Retweet. After some researchs i found that i need the ID of a RT to be able to destroy it with statuses/destroy. Exept that i really don’t understand how:

$response = $tmhOAuth->request('POST', $tmhOAuth->url('1.1/statuses/retweet/'.$idt.'.json')); $data = json_decode($tmhOAuth->response['response'], true); 

I tried $data['id_str']
but it didn’t worked, it actually don’t display anything.

Thanks for you help.


$data[‘id_str’] is the id of the retweet and $data[‘retweeted_status’][‘id_str’] is the id of the original tweet