I am writing a little twitter API (using Elliot Haughin’s library) and I want to reply to a retweet that the app posts.
I have read the docs for statues/update, and have tried using ‘*in_reply_to_status_id*’ with the value taken from ‘*user_mentions*’, but it doesn’t seem to work.
What am I doing wrong, or is there a better way to do it?
Code sample;
$answer = '@'.$retweet->entities->user_mentions[0]->screen_name.' thanks!!';
$this->tweet->call('post', 'statuses/update', array('status' => $answer, 'in_reply_to_status_id' => $retweet->id));
You should include the name of the user who retweeted the post, and not the one that was mentioned in the post.
Of cource, for this to work, you should request the tweets with
include_entities => 1