Hi,
I’m trying to upload an image using the below code with Oauth.
$image_path = "C:\images\img.png";
$connection_camp = new TwitterOAuth(CONSUMER_KEY, CONSUMER_SECRET, $access_token, $access_token_secret);
$media_response = $connection_camp->upload('media/upload', array('media' => file_get_contents($image_path)));
But I couldn’t get any response(not even an error) from twitter api. I’ve already tried media-data with base64 encode but couldn’t get any response. The image path is also correct.
Kindly suggest.
Thanks.