I think I need someone else to take a look at this code because I dont see what I am doing wrong...
I am calling https://api.twitter.com/1.1/geo/searc... API to search for a location on twitter. Other Twitter API calls work great with no problem but this one is constantly returning the following error message:
{"errors":[{"message":"Bad Authentication data","code":215}]}
Here is my code:
var params = {};
params.lat = Appery("labelLat").text();
params.long = Appery("labelLong").text();
params.accuracy = Appery("labelAccuracy").text();
params.query = Appery("searchbarTwitterPlace").val();
params.granularity = "poi";
var authHeader = EncodeHelper.getHeader('https://api.twitter.com/1.1/geo/searc...', params);
params.Authorization = authHeader;
serviceTwitterSearchPlace.execute({data: params});
I know that the EncodeHelper.getHeader works OK because I call other Twitter APIs with it and it works fine. Though admittedly this is the one that has the most number of parameters.
Can anyone see why I am having a 'bad authentication data' error?