Facebook FQL: getting checks within range

Is there a way to use FQL to select all of my friends that are in the range of the specified location? I can use FQL to return my coordinates:

https://api.facebook.com/method/fql.query?access_token={0}&query=SELECT coords FROM checkin WHERE author_uid IN (SELECT uid2 FROM friend WHERE uid1 = me())

but how can I add to the above query to do something like ...

Where coords Within 10 miles of [(New York City, NY) | (long, lat) | (user.current_location)]

Any help would be greatly appreciated. Thanks in advance.

EDIT (3/9 3:05 pm est):

I'm basically only looking for the final result - don't I have to return everything to a single FQL statement or even use FQL (possibly a graphical api)? I understand that I may need to return the data back in detail and work with it locally due to FQL / api graphics limitations. I just want to do this in an efficient way so that the user does not have to wait 20 seconds for everything that needs to be downloaded.

The immediate problem is that if someone has several hundred friends and all checks for each friend are returned, this is too much data to work with.

The details of the results I'm looking for are to start with all my friends and end up in the top 10 places (based on the highest frequency of the location ID to check), which they checked over the past X days, which are at a distance Y from the user's current current location, and where the location page falls into a specific category, such as a panel.

As for the scenario I'm dealing with, and I hope that the additional information added by me does not complicate my initial question. Thanks!

+4
facebook facebook-graph-api coordinates facebook-fql checkin
source share
1 answer

Thus, some undocumented functions called distance () that can help you, although they don't work so well (especially because they are limited to a radius of 50 km):

 SELECT coords, author_uid, tagged_uids, target_id, message FROM checkin WHERE target_id IN (SELECT page_id FROM place WHERE distance(latitude, longitude, "37.75377496892", "-122.42077080676") < 50000) 

Max - 50,000 meters , which is the output module of the FQL (apparently undocumented) distance function.

https://developers.facebook.com/docs/reference/fql/checkin/ https://developers.facebook.com/docs/reference/fql/place

+10
source share

All Articles