检索喜欢某个 URL/网页的 Facebook 用户
如何检索在外部网站上单击“赞”按钮的 Facebook 用户列表?
假设我有一个喜欢按钮:
<fb:like href="http://example.com/xyz"></fb:like>
我想要一个喜欢它的人的 FB 用户 ID 列表。
我尝试过 OpenGraph:(
https://graph.facebook.com/OBJECTID/likes/
其中 OBJECTID 是 example.com/xyz 之类的 id)
和 FQL
select user_id from like where object_id in (
select id from object_url where url = 'http://example.com/xyz'))
,但都返回空结果。
我可以从其他电话中看到点赞计数正常,但我无法获取实际用户。
有人知道我需要什么权限等来检索这些吗?
另请参阅此问题示例代码。
How can I retrieve the list of Facebook users that have clicked the like button on an external site?
Say I have a like button:
<fb:like href="http://example.com/xyz"></fb:like>
I'd like a list of FB user IDs of people who have liked it.
I've tried OpenGraph:
https://graph.facebook.com/OBJECTID/likes/
(where OBJECTID is the id of the like example.com/xyz)
and FQL
select user_id from like where object_id in (
select id from object_url where url = 'http://example.com/xyz'))
but both return empty results.
I can see from other calls that the likes are counted alright, but I can't get the actual users.
Anyone know what permissions etc. I'd need to retrieve these?
Also see this question for sample code.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
简单的答案是“不可能获取喜欢某个页面的个人用户 ID”。
肯定会从用户/页面返回有关喜欢的数据,但不会返回喜欢特定对象(在本例中为可口可乐)的用户列表。但请确保您发送具有适当权限的正确 access_token。
FQL like 用于获取任何对象(例如视频)的点赞,注释、链接、照片或相册。要获取页面的喜欢用户数,请使用 link_stat 或页面。
示例查询将类似于有关
此问题的更清晰答案,请阅读 Jonathan Dean 在 如何列出喜欢某个页面或感兴趣的 Facebook 用户
或 ifaour 答案 查询“喜欢”我的 Facebook 页面的用户
The simple answer is 'Its not possible to get individual user ids who liked a page'.
will surely return the data about the likes from the user/page but not the list of users who liked the specific object(in this case coca-cola). But make sure you send a proper access_token with proper permissions.
The FQL like is used to get the likes of any objects like video, note, link, photo, or album. To get liked users count of a page please use either link_stat or page from FQL.
the sample query will be like
For more clear answers on this, please read the answer by Jonathan Dean in How to list facebook users who like a page or interest
or ifaour answer in Querying Users who 'like' my Facebook Page