update_with_media---i am getting error : Error creating status


#1

I’m trying to update a status with a picture. But I keep getting below error:
stdClass Object ( [request] => /1/statuses/update_with_media.json [error] => Error creating status. )

Below the code i am using to update a status with picture:
include “twitteroauth.php”;

$consumerKey = “XXXXXXXXXXXXXXXX”;
$consumerSecret =“XXXXXXXXXXXXXXXXXXX”;

$randommsgString=“Twitter auto post test”;
$accessToken=“XXXXXXXXXXXXX”;
$accessTokenSecret=“XXXXXXXXXXXXXXXXX”;
$image = ‘logo.png’;
$twitteroauth = new TwitterOAuth($consumerKey, $consumerSecret, $accessToken, $accessTokenSecret);
$twitter_res = $twitteroauth->post(‘statuses/update_with_media’, array(‘media[]’=> “@{$image}”,‘status’=> $randommsgString));

Please provide me the valid solution for this.


#2

i have the same pb :

$code = $tmhOAuth->request('POST', 'https://upload.twitter.com/1.1/statuses/update_with_media.json', array( 'media[]' => '@{$image}', 'status' => $message ) );

Error response :
stdClass Object ( [request] => /1/statuses/update_with_media.json [error] => Error creating status. )


#3

i have the same pb. Any solution or advice ?


#4

i am facing the same issue any one resolved it?


#5

me too fellas, any solutions?


#6

Try change
https://upload.twitter.com/1.1/statuses/update_with_media.json
to
https://api.twitter.com/1.1/statuses/update_with_media.json

v1.1 have a different link as you can see it here: https://dev.twitter.com/docs/api/1.1/post/statuses/update_with_media