twifer
twifer copied to clipboard
error tweet with image
error when tweet with image. error message: You currently have Essential access which includes access to Twitter API v2 endpoints only. If you need access to this endpoint, you’ll need to apply for Elevated access via the Developer Portal.
When I use...
$filename = 'my.png'; $img = $conn->request('POST', 'media/upload', ['media' => $filename]); $params = ['status' => 'Hello World, 'media_ids' => $img['media_id']];
$res = $conn->request('POST', 'statuses/update', $params);
...I get nothing. If I try to use the /2/tweets endpoint I get...
Array ( [errors] => Array ( [0] => Array ( [message] => Request body is not valid JSON. ) ) [title] => Invalid Request [detail] => One or more parameters to your request was invalid. [type] => https://api.twitter.com/2/problems/invalid-request )
How does one upload an image with Twifer... or is it not possible?