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?