Search.json


#1

When calling https://api.twitter.com/1.1/search/tweets.json, it returns {“errors”:[{“message”:“Your credentials do not allow access to this resource”,“code”:220}]}

I am able to get the Bearer token and am using Apache DefaultHttpClient in the following manner:
String url = "https://api.twitter.com/1.1/search/tweets.json
HttpGet httpGet = new HttpGet(url + “?” + params);
httpGet.setHeader(“Authorization”, "Bearer " + bearerToken);
HttpResponse response = httpclient.execute(httpGet);

Any thoughts on why the error?


#2

Have you taken a look at how the request is actually being sent to Twitter? (As in, is the HTTP client you’re using doing the right thing?) Have you tried using the bearer token on the command line (for instance in curl) to verify it’s functioning?


#3

have you found a solution to this problem? I think I have the same error.


#4

Anyone with a solution to this?