Skip to content

Instantly share code, notes, and snippets.

@smaspe
Created June 6, 2013 09:32
Show Gist options
  • Save smaspe/5720386 to your computer and use it in GitHub Desktop.
Save smaspe/5720386 to your computer and use it in GitHub Desktop.
public class TweetsRequest extends JsonObjectRequest {
public TweetsRequest(String url, Listener<JSONObject> listener,
ErrorListener errorListener, List<NameValuePair> params) {
super(url + "?" + URLEncodedUtils.format(params, "UTF-8"),
null, listener, errorListener);
}
@Override
public Map<String, String> getHeaders() throws AuthFailureError {
Map<String, String> headers = new HashMap<String, String>();
String auth = "Bearer " + TwitterValues.ACCESS_TOKEN;
headers.put("Authorization", auth);
return headers;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment