Reputation: 239
I'm trying to retrieve a venue's information by searching for it using a particular geolocation on facebook. I'm trying to do this using FQL.
For example, I want to retrieve a Starbucks places info (I know the Starbucks is actually there), so far i have come up with:
SELECT name, description, latitude, longitude, checkin_count
FROM place
where page_id in ( SELECT page_id from place where name = 'Starbucks' ) and distance(latitude, longitude, "9.961718","-84.054542") < 1000
But unfortunately I only get the following error
"Your statement is not indexable. The WHERE clause must contain an indexable column. Such columns are marked with * in the tables linked from http://developers.facebook.com/docs/reference/fql "
Does someone know what am i doing wrong or how to do what i'm trying to?
Upvotes: 3
Views: 1062
Reputation: 22903
Since FQL is deprecated and unusable, you will now find the FQL way of doing this in the revision history of this post.
To find a place, you can use the Graph API Search.
Places:
/search?q=coffee&type=place
. You can narrow your search to a specific location and distance by adding the center parameter (with latitude and longitude) and an optional distance parameter:/search?q=coffee&type=place¢er=37.76,-122.427&distance=1000
So, the Graph API query that might interest you, would be:
/search?q=Starbucks&type=place¢er=9.961718,-84.054542&distance=1000
Also, note that distance
represents meters.
Upvotes: 1