Search V1.1 API not working


#1

Using Oauth Library https://github.com/jmathai/twitter-async

When upgrading to API v1.1, calls to URLs like https://api.twitter.com/1.1/statuses/user_timeline.json works fine.

But when URL is changed to https://api.twitter.com/1.1/search/tweets.json?q=sony or https://api.twitter.com/1.1/users/show.json?screen_name=sony does not work. Error Code 32: Could not authenticate you

Any ideas? Help is appreciated.


#2

Going to close this issue. The problem was that the v1.1 oAuth is much stricter and you have separate the URL and the request string.

So this won’t work
$creds = $twtObj->get(’/search/tweets.json?q=sony’);

But this will
$creds = $twtObj->get(’/search/tweets.json’, array(‘q’ => ‘sony’));