Mongrel Jedi
Mongrel Jedi

Reputation: 777

Facebook Graph API - Place Distance Inaccurate

I am trying to use Facebook Graph API to retrieve a set of places at a certain coordinate.

Using the API, I executed the following query:

https://graph.facebook.com/search?access_token=APPTOKEN&type=place&center=3.187501,101.627542&distance=50000&limit=500

Theoretically, this query should return 500 places within 50km of that coordinate. However, it only returned some 15 results that are within the immediate vicinity (say few hundred meters) of that coordinate. I tried changing the distance to 10000, 5000 or even 1000, while tweaking the limit parameter to figures such as 50, 100, 1000 but the total results remain the same.

There are certainly other places nearby, i.e. if I change the query's coordinates to the following location which is less than a kilometer away, it returns a whole new result set:

https://graph.facebook.com/search?access_token=APPTOKEN&type=place&center=3.192022,101.625647&distance=50000&limit=500

Can someone please advice if my query is problematic, or that Facebook's Graph API is somehow limiting the distance or total results?

Thank you.

Upvotes: 1

Views: 1088

Answers (2)

Txaku
Txaku

Reputation: 173

The fact that you only get 15 places in that kind of search was a bug on Facebook.

This bug has been solved today so your query should work better now (I actually tried and it does). Anyway here you can see more details about this bug.

What I personally don't know is this: Now your query returns around 450 results, if you limit it to 5km instead of 50km is still more or less the same amount of places.

I tried queries with different distances and coordinates, seems to me that Facebook limits your total amount of results so you never have more than around 450 places. Even using pagination (with an offset) I can't manage to get more results (and I know there are more than 500 places within 50km around New York...)

So if you find the answer to this I would be interested ;)

Upvotes: 3

Michael Lucy
Michael Lucy

Reputation: 13

I am encountering a similar problem, I have built a tool to return geo-locale results based upon keyword, city/state (or zip code) and radius up to 30 miles. What used to work flawlessly up until early December 2013 started to return only 15 results in late December. My "educated guess" is that FB is limiting results to prevent people like you and me from turning a profit from this information!!!

Upvotes: 0

Related Questions