How do I search for users in Facebook using certain conditions such as location in Graph API

佐手、 提交于 2019-12-14 02:14:50

问题


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:


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.



来源:https://stackoverflow.com/questions/23729802/how-do-i-search-for-users-in-facebook-using-certain-conditions-such-as-location

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!