Error Upload media (images) to Twitter - POST media/upload using TwitterOAuth

media
oauth
php

#1

Firs-timer : I’m trying to use API media/upload but im having this error

PHP CODE
use Abraham\TwitterOAuth\TwitterOAuth;
$tweet = new TwitterOAuth($consumer_key, $consumer_secret, $access_token, $access_token_secret);
$media1 = $tweet->upload(‘media/upload’, array(‘media’ => ‘chevendetta.png’));

Fatal error: Uncaught exception
’Abraham\TwitterOAuth\TwitterOAuthException’ with message 'Operation
timed out after 5000 milliseconds with 0 bytes received’ in
C:\xampp\htdocs\twitteroauth-master\src\TwitterOAuth.php:400
Stack trace:


#2

Problem solved.


#3

Are you able to share the solution for others?


#4