使用 facebook graph api 选择字段

发布于 2025-01-06 18:50:04 字数 296 浏览 0 评论 0原文

facebook 是否支持图形 API 的归档字段?

例如,
https://graph.facebook.com/[uid]/friends/?fields=events

将为所有朋友及其活动提供信息。
之类的操作来控制我想要在事件中使用的字段吗

<https://graph.facebook.com/[uid]/friends/?fields=events,events__updated_time>  

我还可以通过执行类似“谢谢”

does facebook support field of filed for graph api?

For example,
https://graph.facebook.com/[uid]/friends/?fields=events

will give all friends and their events.
Can I also control which field i want in the events by doing something like

<https://graph.facebook.com/[uid]/friends/?fields=events,events__updated_time>  

Thanks

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

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

发布评论

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

评论(1

寄意 2025-01-13 18:50:04

您无法直接通过 Graph API 执行此操作,但是对于更复杂的查询,最好的办法是查看 FQL。在您的具体示例中,您可以执行以下操作:

SELECT eid, update_time FROM event WHERE eid IN (SELECT eid FROM event_member WHERE uid IN (SELECT uid2 FROMfriend WHERE uid1 = me()))

您可以通过执行以下操作针对 Graph API 运行此命令:

https://graph.facebook.com/fql?q=SELECT eid, update_time FROM event WHERE eid IN (SELECT eid FROM event_member WHERE uid IN (SELECT uid2 FROMfriend WHERE uid1 = me()))

使用 图形 API 浏览器

You can't do this directly through the Graph API, however the best thing to do with more complex queries is to look into FQL. In your specific example, you can do something like this:

SELECT eid, update_time FROM event WHERE eid IN (SELECT eid FROM event_member WHERE uid IN (SELECT uid2 FROM friend WHERE uid1 = me()))

You can run this against the Graph API by doing:

https://graph.facebook.com/fql?q=SELECT eid, update_time FROM event WHERE eid IN (SELECT eid FROM event_member WHERE uid IN (SELECT uid2 FROM friend WHERE uid1 = me()))

Test this using the Graph API Explorer

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