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

[code] => 99 [message] => Unable to verify your credentials [label] => authenticity_token_error #237

Closed jdurga closed 5 years ago

jdurga commented 6 years ago

I followed the steps as in README file, but I am receiving error apply only authentication. [code] => 99 [message] => Unable to verify your credentials [label] => authenticity_token_error

How to resolve this error?

My code:

\Codebird\Codebird::setConsumerKey('MyKey', 'MySecret'); // static, see README

$cb = \Codebird\Codebird::getInstance();

if($cb == NULL)
{
     ost_api_log("code bird instance is NULL");

}

if(isset($_SESSION['bearer_token']) == false)
{
    $reply = $cb->oauth2_token();
    $replyP = print_r($reply);
    $bearer_token = $reply->access_token;
    $_SESSION['bearer_token'] = $bearer_token;

}
mynetx commented 6 years ago

Apparently your tokens are incorrect – have you cross-checked with your listing at https://developer.twitter.com/en/apps ?

mynetx commented 6 years ago

@jdurga Any ideas about this? :)

mynetx commented 5 years ago

Closing since there were no further replies.