按学校查找 Facebook 好友

发布于 2024-10-03 22:52:35 字数 238 浏览 0 评论 0原文

我们的网站有学校信息;当用户使用 Facebook 登录我们的网站时,我们希望显示该用户的朋友在该学校就读的几张照片。

Facepile 社交插件将显示喜欢该学校的用户,但这似乎与将学校添加到您的教育历史记录不同。 (例如,我不喜欢我的高中,但它出现在我的用户信息中。)

是否有某种方法可以使用 Graph API 或 FQL 来执行此操作?例如,给定学校的页面 ID 和用户的访问令牌,是否有某种方法可以按学校查询用户的好友?

Our website has school info; when users login to our site with Facebook, we'd like to display a few photos of the user's friends who have attended the school.

The Facepile social plugin will show users who have Liked the school, but that appears to be different from adding the school to your education history. (For example, I haven't Liked my high school, but it appears in my user info.)

Is there some way to do this using the Graph API or FQL? e.g. given a school's page ID and a user's access token, is there some way to query for the user's friends by school?

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

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

发布评论

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

评论(2

两相知 2024-10-10 22:52:35

感谢 omalleyt 您可以使用这样的 URL 来查询用户朋友的所有education 对象,其中包括ID。

https://graph.facebook.com/me/friends?fields=name,id,education&access_token=blah

Thanks to omalleyt you can use an URL like this to query for all of a user's friends' education objects, which include IDs.

https://graph.facebook.com/me/friends?fields=name,id,education&access_token=blah
羅雙樹 2024-10-10 22:52:35

除非我遗漏了什么,否则您应该能够获取已加入/喜欢学校页面的人员列表,并且您应该能够获取用户拥有的朋友列表。获得两个列表后,比较并查找两个列表中的共同条目。您最终应该得到一份朋友名单,所有这些朋友都加入/喜欢了学校。

Unless I'm missing something, you should be able to get the list of people that has joined/liked the school's page, and you should be able to get the list of friends the user has. Once you have both lists, compare and find common entries in both lists. You should end up with a list of friends, that all joined/liked the school.

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