It's the first time for me to try to get a REST call to work thru POST from Firefox. I generated the token and the Auth strings needed as follows:
oauth_consumer_key
oauth_nonce
oauth_signature
oauth_signature_method
oauth_timestamp
oauth_token
Does the order meter? Because I can't understand if I'm missing anything else. Here is my Request
https://api.twitter.com/1.1/search/tweets.json?q=&geocode=30.0444,31.2357,1km&until=2013-11-30&result_type=mixed&oauth_consumer_key=0xxxQ&oauth_nonce=bcbcxxx8&oauth_signature=pXXXglKjY%3D&oauth_signature_method=HMAC-SHA1&oauth_timestamp=1390221337&oauth_token=2287933520-fuxxxR0&count=100
The Response is:
401 Unouthorized
{"errors":[{"message":"Could not authenticate you","code":32}]}
Could anyone help please?
Thanks,
EDIT 1
As Mike suggested the Console, it actually does work from the console, but the console asks you to login so it manages the authorization, which is fine
Now that I know my request works, how to add these parameters to an $.ajax
call? I tried adding the following:
beforeSend : function(req) {
req.setRequestHeader('Authorization', auth);
},
where "auth" is the "OAuth oauth_consumer_key=...
" but I get a bad request error 400.
Ideas anyone?
Thanks,