jublo / codebird-php

Easy access to the Twitter REST API, Direct Messages API, Account Activity API, TON (Object Nest) API and Twitter Ads API — all from one PHP library.
https://www.jublo.net/projects/codebird/php
GNU General Public License v3.0
776 stars 234 forks source link

An client error occurred: The OAuth 2.0 access token has expired, and a refresh token is not available. #170

Closed NeoCsatornaja closed 7 years ago

NeoCsatornaja commented 8 years ago

Hy! I get this erorr on my page:

An client error occurred: The OAuth 2.0 access token has expired, and a refresh token is not available. Refresh tokens are not returned for responses that were auto-approved.

How can I fix this? My code is:

$params = array(
    'status' =>"https://www.youtube.com/watch?v=".$status['id'], $status['snippet']['title'],
     );
     $reply = $cb->statuses_update($params);

(And of course I gived the datas like acsess token, and other tokens, and I included codebird.php). I would like to auto post to twitter. Why dosen't work?

mynetx commented 8 years ago

Hello @NeoCsatornaja,

The error message you quoted doesn't originate from Codebird nor Twitter. Can you please re-check?

Also, application-only auth is not supported when you send a Tweet using statuses/update. You will have to go through the complete OAuth flow.