How do I search for users in Facebook using certai

2019-07-24 19:24发布

I've been experimenting with the Facebook Graph API, and been researching several questions on Stack Overflow and other internet resources, and I can't seem to figure out how to search users in Graph API and see their location as well (assuming their location is publicly available).

I've looked at:

Facebook Search API - List all users based on location?

PHP Facebook FQL: Making queries in the new SDK

Search for posts using Facebook Graph Api

And although one of them says that you can search for users based on location, I don't think that's correct. But, I was under the impression FQL is no longer supported, as it has been replaced by the Graph API?

Currently I formulate a Graph API URL like the following:

https://graph.facebook.com/search?q=Users_to_Search&type=user&center=47.5700,122.6525&distance=10000&access_token=ACCESS_TOKEN

To try and find users near a certain point, but apparently the "center" and "distance" arguments are simply ignored, and the page merely lists all users that match the query, and only lists their name and ID, not location.

Is there any way to search for users, but only if they're in a certain location? Something like:

SELECT users FROM user WHERE Location="Bremerton, Washington"

1条回答
戒情不戒烟
2楼-- · 2019-07-24 20:26

Simply put: This is not possible via search afaik. Have a look at the Search API docs here: https://developers.facebook.com/docs/graph-api/using-graph-api/v2.0#search

Also with FQL (which will be available until April 30th 2016), there's no way of doing this.

查看更多
登录 后发表回答