I am trying to use the TwitterOAuth solution from Abraham.
I've done everything as described in his documentation, but I still get that error:
{"errors":[{"code":32,"message":"Could not authenticate you."}]}
That's my source code:
require "twitteroauth/autoload.php";
use Abraham\TwitterOAuth\TwitterOAuth;
$consumerkey = 'xx';
$consumersecret = 'xx';
$accesstoken = 'xx';
$accesstokensecret = 'xx';
$connection = new TwitterOAuth($consumerkey,$consumersecret,$accesstoken,$accesstokensecret);
$tweets = $connection->get("search/tweets.json?q=superbowl");
echo json_encode($tweets);
All the keys are correct. I have no clue, why this still happens. The App Permission are Read only.
What I want to do is get tweets based on a search query.
Do you have any idea how to fix this? Let me know, if you need some more information.
Hope this will fix your problem....
#Actually in my case the reason behind ]Could not authenticate you; Error: 32]
was this line of code that i had tested for my project:
I am Using TwitterOAuth PHP Library for the Twitter REST API, https://twitteroauth.com/ .
HTTP GET https://api.twitter.com/1.1/search/tweets.json
TwitterOAuth