使用 facebook graph api 选择字段
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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您无法直接通过 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