Page 2 of 2

Calling Twitter api (authentication issue)

Posted: Tue Feb 25, 2014 8:46 am
by Maryna Brodina

Hello! You pass Authorization as query parameter, not header. But it should be header. Here is more information https://getsatisfaction.com/apperyio/...


Calling Twitter api (authentication issue)

Posted: Tue Feb 25, 2014 3:43 pm
by araskin3i

Thanks. This makes sense. Can you please confrirm that I am passing in the headers correctly? I am not sure if it should be an array..

var params = {};

params.lat = Appery("labelLat").text();
params.long = Appery("labelLong").text();
params.accuracy = Appery("labelAccuracy").text();
params.query = encodeURI( Appery("searchbarTwitterPlace").val() );
params.granularity = "poi";

var authHeader = EncodeHelper.getHeader('https://api.twitter.com/1.1/geo/searc...', params);
var headersObj = {"Authorization": authHeader};

serviceTwitterSearchPlace.execute({data: params, headers:headersObj});


Calling Twitter api (authentication issue)

Posted: Tue Feb 25, 2014 7:16 pm
by Kateryna Grynko

HI Alon,

Yes, you pass the headers correctly.


Calling Twitter api (authentication issue)

Posted: Wed Feb 26, 2014 1:39 am
by araskin3i

Thanks Katya. Unfortunately I am still get an authentication error though it is a different one this time (which I guess is kind of a good sign). I will debug in more detail tomorrow and report back what I have found...

Thanks again for your assistance.

Alon