I’m damned if I can make this work. Your help would be appreciated. I have valid access tokens, and can use twitteroauth to post status updates. However: every way I’ve tried to come at retweets has failed.
$parameters = array('id' => $status_id);
$retweet = $connection->post('statuses/retweet', $parameters);
Gets an error response of “not found.” I’m not sure what’s not found – the id of the tweet that I’m trying to retweet, or the method I’m calling (statuses/retweet). I’m passing valid ID’s through the request (I can find them on Twitter), and so on. Any ideas?
Here’s the documentation:
http://dev.twitter.com/doc/post/statuses/retweet/:id
I’ve also tried:
$parameters = array('id' => $status_id);
$retweet = $connection->post('statuses/retweet/', $parameters);
$parameters = array('id' => $status_id);
$retweet = $connection->post('statuses/retweet/:', $parameters);
and…
$retweet = $connection->post('statuses/retweet/:123456.json');
With either null responses (??) or the same enigmatic “not found.”
:idis a variable syntax that similar to PHP’s$idso you replace it in its entirety with the value.$parametersis only used when the key value pairs are getting added as URL parameters like?key=valuenot in the URL path.The format is automatically handled by the library so you should not include
.jsonmanually.