问题
I am developing a application that uses Deezer search API to look for a track.
Im a using this GET query : http://api.deezer.com/search/autocomplete?q=eminem On my computer, the query returns a lot of tracks
However, when deployed to Windows Azure (on Western Europe zone), this same query returns a response with no tracks :
{"tracks":{"data":[]},"albums":{"data":[]},"artists":{"data":[{"id":13,"name":"Eminem",.....
Is there any limitations regarding calls to the search API ? Why this is not working ?
回答1:
It seems like you're getting US local results, requests from Windows Azure seem to be somehow located from there.
Requests coming from US servers will receive empty data, because Deezer's not available there, You can work around that issue by passing an access_token parameter with the request. If the access_token is associated with a Premium user who registered in a Deezer live country (e.g. Italy for example), the request will take the user country associated with the token into account. Therefore, it will return results. That above workaround isn't working for free users.
来源:https://stackoverflow.com/questions/24245128/why-deezer-search-api-is-not-returning-results-on-deployed-cloud-application