abraham / twitteroauth

The most popular PHP library for use with the Twitter OAuth REST API.
https://twitteroauth.com
MIT License
4.3k stars 1.71k forks source link

statuses/update #1232

Closed jazz265 closed 4 months ago

jazz265 commented 4 months ago
$connection->setApiVersion('2');
$status_id = '1234567890';
$rep= '@name test';

$result = $connection->post('statuses/update', array('in_reply_to_status_id'=> $status_id , 'status' => $rep ));
var_dump($result);

I'm trying this code, but it doesn't work well and the result is returned as null. Tweets and media/upload are working, but only status/update is not working properly. Is there something missing?

abraham commented 4 months ago

'statuses/update' is API v1.1, you need to use the v2 version.

jazz265 commented 4 months ago

thank you so much!solved!