从 Facebook 页面获取粉丝
所以,这是我的场景:我必须从 Facebook 页面获取所有粉丝,但 Graph API 没有任何方法来执行此操作。
我搜索了整个 Google 和 Stack Overflow,发现了一个错误报告,每个人都说它确实存在,但 Facebook 由于一些问题而停止了。他们正在努力修复,但到目前为止还没有好消息。
然后我想到了一个(明显的)想法:构建一个爬虫来获取粉丝怎么样?
有人知道 Facebook 是否允许此类信息访问吗?至少,在他们修复 API 之前是这样。
So, this is my scenario: I have to fetch all the fans from a Facebook Page, but the Graph API don't have any method to do this.
I searched whole Google and Stack Overflow and found a bug report where everyone saying it existed but Facebook discontinued for some problems. They are trying to fix, but no good news so far.
Then an (obvious) idea came to me: what about building a crawler to fetch the fans?
Anyone have an idea if Facebook allow this kind of information access? At least, until they fix the API.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
FQL 的条件部分必须包含索引字段。
这里
uid
是page_fan
表的索引字段。所以我们无法在不使用数据的情况下检索数据。上述查询仅提供用户喜欢的页面的 ID。
经过详细搜索检索粉丝详细信息后,我得出的结论是,出于安全原因,Facebook 不提供粉丝的详细信息。
The condition part of a FQL must contains an indexed field.
Here
uid
is the indexed field of thepage_fan
table. So we can't retrieve the data without using it.The above query only provides the ID of the page the user had liked.
After the detailed search for retrieving the fans details, I reached the conclusion that Facebook does not provide the fan's details because of security reasons.
Graph API 没有任何问题,你只需要使用另一种方法来解决这个问题。该解决方案称为 FQL。
Facebook 有一个名为
page_fan
的表(文档此处 ),您可以使用它来查找喜欢页面粉丝(粉丝)的用户。我们以可口可乐公司的页面为例。此页面的 ID 为
40796308305
。获取该页面所有粉丝 id 的查询是:当然,您需要一个有效的 acces_token 才能在您的应用程序中使用它。如果您想实时测试此查询,请使用以下网址:
祝您好运!
There's nothing wrong with the Graph API, you just have to use another method for this matter. The solution is called FQL.
Facebook has a table called
page_fan
(docs here) which you can use to find users who liked of a page fan (fans).Let's take for example the page of The Coca Cola company. This page has the id
40796308305
. The query to get all the ids of fans of this page is:Of course, you will need a valid acces_token to use this in your application. If you want to test live this query, use the following url:
Good luck!
这曾经可以使用 FQL(如 misterjinx 发布的内容)来工作,但不幸的是不再工作,并且不可用于 Facebook 图形 api。 page_fan 文档页面上有很多人对此发表评论,但没有解决方案眼下。
This used to work using FQL like misterjinx posted but unfortunately no longer works and is not available with the Facebook graph api. There are lots of people commenting about it on the page_fan documentation page but no solution at the moment.
我用这个来做 page_fan
I used this for page_fan
有点晚了,但是如果您还没有找到解决方案,您所需要做的就是从
http://graph.facebook.com/cocacola
将 cocacola 更改为您要为其收集粉丝的 Facebook ID 。
A bit late, but if you havent found the solution, all you need to do is get the number from
http://graph.facebook.com/cocacola
change cocacola for the facebook ID you want to collect fans for.