获取用户使用 FQL 进行 Facebook 点赞

发布于 2024-09-09 02:55:29 字数 305 浏览 6 评论 0原文

大家好,我正在尝试使用 FQL 获取我朋友在 FB 上的点赞。

'SELECT name,type FROM page WHERE page_id IN (SELECT target_id  FROM connection WHERE source_id=%i and target_type="Page") AND type!="APPLICATION"'%(friend.fb_uid))

当我请求自己的点赞但没有为我的朋友返回任何内容时,查询按预期工作。我已经添加了喜欢的权限,但仍然没有。

有什么想法吗?

Hello everyone I am trying to get my friends 's likes on FB using FQL

'SELECT name,type FROM page WHERE page_id IN (SELECT target_id  FROM connection WHERE source_id=%i and target_type="Page") AND type!="APPLICATION"'%(friend.fb_uid))

The query works as expected when I am asking for my own likes but return nothing for my friends. I have added the likes permission but still nothing.

Any ideas?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

喜爱纠缠 2024-09-16 02:55:29

此处的 page_fanhttp://developers.facebook.com /docs/reference/fql/page_fan 可能适合您的用例(我将检查为什么连接表有不同的行为)。尝试如下操作:

'SELECT name, type FROM page WHERE page_id IN (SELECT page_id FROM page_fan WHERE uid=%i) AND type != "APPLICATION"'%(friend.fb_uid)

这当然是在请求friends_likes许可之后。

The page_fan table here http://developers.facebook.com/docs/reference/fql/page_fan might work for your use case (I'm going to check why the connections table has different behaviour). Try something like:

'SELECT name, type FROM page WHERE page_id IN (SELECT page_id FROM page_fan WHERE uid=%i) AND type != "APPLICATION"'%(friend.fb_uid)

This is of course after asking for the friends_likes permission.

暗恋未遂 2024-09-16 02:55:29

用户必须先向您的应用程序授予 user_likes 权限,然后您才能执行此操作。

如果您要在用户未登录时执行此操作,您还需要提示他们获取 offline_access 权限。

http://developers.facebook.com/docs/authentication/

The user has to grant your application the user_likes permission before you can do that.

And if you're going to do while the user is not logged in, you'll need to prompt them for the offline_access permission as well.

http://developers.facebook.com/docs/authentication/

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文