Closed justindlong closed 7 years ago
twitteroatuh uses version 1.1 of the TwitterApi already:
class TwitterOAuth extends Config
{
const API_VERSION = '1.1';
... and Further in src/TwitterOAuth.php:
$url = sprintf('%s/%s/%s.json', $host, self::API_VERSION, $path);
How did you download / update it - via Composer or manually?
actually, from the download link off Github. I'll try d/l from twitteroauth.com.
I am using the latest version (0.7) downloaded from https://github.com/abraham/twitteroauth/releases, and still getting the same error.
Scratch that. At some point I interjected "media/upload.json", and that's the problem. Sorry.
;-) happens
Media1 stdClass Object ( [errors] => Array ( [0] => stdClass Object ( [message] => The Twitter REST API v1 is no longer active. Please migrate to API v1.1. https://dev.twitter.com/docs/api/1.1/overview. [code] => 64 )
)
PHP Code: echo "uploading media: ",$tRec['media'],"\n"; // it's got media, load the media, then post to twitter $media1 = $connection->upload('media/upload.json', ['media' => '/home/justinlo/public_html/tweet/graph/'.$tRec['media']]); $status = $connection->post("statuses/update", array( "status"=>$string, 'media_ids'=>$media1->media_id_string ) ); // post to twitter
I just re-downloaded the most current version of the twitteroauth library today.