Was wondering if anyone has upgraded twitteroauth.php to include media uploads yet?
I'm getting close, but just rain into a 'Uncaught InvalidArgumentException: You must supply a readable file in' using the url to the image as..
PHP Code:
$urlprod = $storeUrl . '/images/' . $_POST['products_image'];
Then after connection trying to upload and get the media ID in
PHP Code:
//upload the image and get an MediaID
$media = $connection->upload('media/upload', ['media' => $urlprod]);
$parameters = [
'status' => $message,
'media_ids' => $media->media_id_string
];
//send message
$tweet = $connection->post('statuses/update', array('status' => $parameters));
The upload connection is where the stop is... the error file is..
Code:
[21-Sep-2018 21:03:18 America/Los_Angeles] PHP Fatal error: Uncaught InvalidArgumentException: You must supply a readable file in /****************************/includes/modules/twitteroauth/twitteroauth.php:239
Stack trace:
#0 /****************************/includes/modules/twitteroauth/twitteroauth.php(208): TwitterOAuth->uploadMediaNotChunked('media/upload', Array)
#1 /****************************/includes/modules/product/update_product.php(146): TwitterOAuth->upload('media/upload', Array)
#2 /****************************/product.php(61): require('/home/.../...')
#3 {main}
thrown in /****************************/includes/modules/twitteroauth/twitteroauth.php on line 239
Think I need to start back tracing twitteroauth.php for the issue.. The image patch id https://www-siteURL-/image/product/1234.jpg and it's under the max 5MB's