Oauth-Module-for-Parse-Cloud-Code
Oauth-Module-for-Parse-Cloud-Code copied to clipboard
Yelp V2 search API not work
Hello ,
I try to use your code to call yelp v2 API in parse. however, I always got the invalid signature problem. The only thing is different from your example is this line:
var orderedParameters= oa._prepareParameters(auth.accessToken, auth.accessTokenSecret, 'GET', finalUrl, null);
and of course also here: var webSearchUrl = 'http://api.yelp.com/v2/search'
Could you give me some hints how to call yelp v2 with your oauth module? thanks !
hey @chauchinyiu - I had the same invalid sig problem -- the issue on my end was with the URI encoding. I went ahead and removed the included uri encoding block and went with the following:
var finalUrl = webSearchUrl + '?' + "location=" + encodeURIComponent(location) + "&term=" + encodeURIComponent(searchTerm);
I know it's a bit after you asked, but leaving this here in case anyone else runs into a similar issue