Reputation:
I'm creating a Facebook app in which I want to display content depending on the location of the user. Realtime geolocation is not needed, but I would like to use the user's location id provided by Facebook. So what I need is a function that takes the user's location id and a given radius as input parameters and returns the location ids of towns, villages within the radius.
I saw that Facebook's area based lists use such methods to filter friends. But I have no idea how to implement it in my own application. Any hints? Tutorials? Sample codes? I'd be grateful if you could help me. Thanks.
Upvotes: 0
Views: 2458
Reputation: 31880
1) Using the location ID get the coordinates of the respective page 2) Call the graph API's search for locations (see Search section of http://developers.facebook.com/docs/reference/api/) using those coordinates.
https://graph.facebook.com/search?q=coffee&type=place¢er=37.76,-122.427&distance=1000
or
https://graph.facebook.com/search?type=location¢er=37.76,-122.427&distance=1000
Upvotes: 1