使用 graph-api/fql,如何获取引起通知的帖子/评论?
我可以使用 FQL 遍历通知列表。伟大的。现在,我如何弄清楚如何获取通知适用的帖子/评论?
例子: 通知是:“UserX 对您的帖子发表了评论!”
从返回的 fql 表中,如何找到所述评论的 post_id 或 xid,以便我可以找到该帖子和评论列表?
I can traverse the list of notifications by using FQL. Great. Now, how do I figure out how to get the post/comment to which the notification applies?
Example:
The notification is: "UserX commented on your post!"
From the fql table returned, how do I find the post_id or the xid for said comment so that I can find the post and the list of comments?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以调用 REST API notification.getList - https://developers.facebook。 com/docs/reference/rest/notifications.getList/
除了基本权限外,您不需要任何权限。
这将返回数据,包括 object_id 和 object_type。
如果 object_type 是“stream”,您可以通过 notification.getList 查询将 post_id 字段设置为 object_id 来查询流表。您可以从流表中获取评论。
notification.getList 响应的示例片段:
您的后续查询:
You can call the REST API notifications.getList - https://developers.facebook.com/docs/reference/rest/notifications.getList/
You do not need any permissions beyond the basic.
This will return data including, object_id and object_type.
If object_type is "stream" you can query the stream table with the post_id field set to the object_id from the notifications.getList query. You can get the comments from the stream table.
Example snippet of notifications.getList response:
Your follow-on query: