如何使用某些条件(例如Graph API中的位置)在Facebook中搜索用户 [英] How do I search for users in Facebook using certain conditions such as location in Graph API

查看:142
本文介绍了如何使用某些条件(例如Graph API中的位置)在Facebook中搜索用户的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在尝试使用Facebook Graph API,并研究了有关Stack Overflow和其他互联网资源的几个问题,但我似乎无法弄清楚如何在Graph API中搜索用户并查看他们的位置(假设他们的位置是公开可用的.

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).

我看过:

Facebook搜索API-根据位置列出所有用户?

PHP Facebook FQL:在新的SDK中进行查询

使用Facebook Graph Api搜索帖子

尽管其中之一说您可以根据位置搜索用户,但我认为这是不对的. 但是,我的印象是不再支持FQL,因为它已被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?

目前,我制定了一个类似于以下内容的Graph API URL:

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

要尝试找到某个点附近的用户,但是显然会忽略"center"和"distance"参数,并且该页面仅列出与查询匹配的所有用户,并且仅列出其名称和ID,而不列出位置

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:

从用户WHERE Location =华盛顿州布雷默顿"中选择用户

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

推荐答案

简单地说:这不可能通过搜索afaik实现.在此处查看Search API文档: https ://developers.facebook.com/docs/graph-api/using-graph-api/v2.0#search

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

还有FQL(将在2016年4月30日之前提供),没有办法做到这一点.

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

这篇关于如何使用某些条件(例如Graph API中的位置)在Facebook中搜索用户的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆