Facebook graph api 如何从facebook api获取特定国家的所有城市?

Facebook graph api 如何从facebook api获取特定国家的所有城市?,facebook-graph-api,Facebook Graph Api,Facebook对城市有自己的定义,所以我如何才能得到它认为是城市的所有地方的列表。按州或国家排列。参见第二个答案: 多谢各位 To check what countries are available you could just get a response from this endpoint: URL: https://graph.facebook.com/API_VERSION/search?type=adgeolocation&location_types=['countr

Facebook对城市有自己的定义,所以我如何才能得到它认为是城市的所有地方的列表。按州或国家排列。

参见第二个答案:

多谢各位

To check what countries are available you could just get a response from this endpoint:

URL: https://graph.facebook.com/API_VERSION/search?type=adgeolocation&location_types=['country']

HTTP_METHOD: GET

You also have to set your access token in the URL.

To just see the fields key and name and a larger quantity of countries without being paginated this would be the complete URL:

https://graph.facebook.com/API_VERSION/search?type=adgeolocation&location_types=['country']&fields=key,name&limit=1000