Hi,
I am getting kind of desperate for answers.
I am using this ridiculously simple script to auto Tweet on behalf of a user.
Upon executing this code, text gets Tweeted on my twitter account however the image does not. I have been previously advised to only attempt tweeting local files and I was advised this is the proper way to specify the media[].
Why isnt this posting the image while its posting the text to twitter?
Can anybody please help? I have been struggling with this for days
I am getting kind of desperate for answers.
I am using this ridiculously simple script to auto Tweet on behalf of a user.
PHP:
$image = 'test.jpg';
// Insert your keys/tokens
$consumerKey = 'xxx';
$consumerSecret = 'xxx';
$OAuthToken = 'xxx';
$OAuthSecret = 'xxx';
// Full path to twitterOAuth.php (change OAuth to your own path)
require_once('connect/twitter/twitteroauth.php');
$params = array(
'status' => $_REQUEST['content'],
'media[]' => '@{$image}'
);
// create new instance
$tweet = new TwitterOAuth($consumerKey, $consumerSecret, $OAuthToken, $OAuthSecret);
// Send tweet
$tweet->post('statuses/update', $params);
Upon executing this code, text gets Tweeted on my twitter account however the image does not. I have been previously advised to only attempt tweeting local files and I was advised this is the proper way to specify the media[].
Why isnt this posting the image while its posting the text to twitter?
Can anybody please help? I have been struggling with this for days