We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ive retrieve a image url from direct messages using this
$parameter_get_dm = ['count' => 10]; $get_dm = $twitter->directMessages_events_list($parameter_get_dm); foreach($get_dm->events as $item){ $file = $item->message_create->message_data->attachment->media->media_url; }
it will show https://ton.twitter.com/i/ton/data/dm/123/123/filename.jpg after
https://ton.twitter.com/i/ton/data/dm/123/123/filename.jpg
then i use this to upload the media
$upldimg = $twitter->media_upload([ 'media' => 'https://ton.twitter.com/1.1/ton/data/dm/123/123/filename.jpg' ]); print_r($upldimg);
but it is not working and the error log shows
[06-May-2020 14:10:39 UTC] PHP Fatal error: Uncaught Codebird\CodebirdMediaException: Downloading a remote media file failed. in .../vendor/codebird/src/codebird.php:1924 Stack trace: #0 .../vendor/codebird/src/codebird.php(1886): Codebird\Codebird->_fetchRemoteFile('https://ton.twi...') #1 .../vendor/codebird/src/codebird.php(1826): Codebird\Codebird->_buildBinaryBody('https://ton.twi...') #2 .../vendor/codebird/src/codebird.php(1800): Codebird\Codebird->_checkForFiles('media/upload', 'media', 'https://ton.twi...') #3 .../vendor/codebird/src/codebird.php(1858): Codebird\Codebird->_getMultipartRequestFromParams('media/upload', '---------------...', Array) #4 .../vendor/codebird/src/codebird.php(2263): Codebird\Codebird->_buildMultipart('media/upload', Array) #5 /h in .../vendor/codebird/src/codebird.php on line 1924
how to solve this? iam still confused using this library
The text was updated successfully, but these errors were encountered:
No branches or pull requests
ive retrieve a image url from direct messages using this
it will show
https://ton.twitter.com/i/ton/data/dm/123/123/filename.jpg
afterthen i use this to upload the media
but it is not working
and the error log shows
how to solve this? iam still confused using this library
The text was updated successfully, but these errors were encountered: