Oauth-Module-for-Parse-Cloud-Code icon indicating copy to clipboard operation
Oauth-Module-for-Parse-Cloud-Code copied to clipboard

Yelp V2 search API not work

Open chauchinyiu opened this issue 11 years ago • 1 comments

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 !

chauchinyiu avatar Dec 29 '13 23:12 chauchinyiu

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

Liampronan avatar Apr 10 '15 05:04 Liampronan