Skip to content
New issue

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

error tweet with image #2

Open
ciccooo opened this issue Jul 9, 2022 · 1 comment
Open

error tweet with image #2

ciccooo opened this issue Jul 9, 2022 · 1 comment

Comments

@ciccooo
Copy link

ciccooo commented Jul 9, 2022

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.

@pgplast
Copy link

pgplast commented Jun 1, 2023

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants