使用开放图获取 Facebook 帖子评论的通知
我有一个正在将更新发布到 Facebook 的应用程序。我正在使用开放图 API。底层库实现了一些回调功能,您可以在其中收到用户对象更新的通知,例如当用户更改名称等时。
但是,我想在我发表的帖子或某人喜欢的帖子上发表新评论时获得回调我发的一个帖子。
现在我必须查询我所有的帖子,看看是否有任何新评论。当您发布评论时,Facebook 不会为您提供 ID,因此您在解析时必须仅查看内容和用户。
那么对于我的问题。有没有办法在帖子更新时注册回调?它使用与用户一相同的机制吗?
不确定这有什么区别,但应用程序位于 Rails 中,并且我正在使用 Koala Graph api。
I have an application that I am posting updates to facebook. I am using the open graph API. The underlying library has implemented some callback features where you can get notified of updates to a user object like when the user changes their name etc.
However, I want to get a callback when a new comment is made on a post I made or someone likes a post I made.
Right now I would have to query all my posts and see if there are any new comments. Facebook doesn't give you an ID when you post a comment so you have to go on just the content and user when parsing.
So to my question. Is there a way to register a callback for when a post is updated? Does it use the same mechanism as the user one?
Not sure it makes a difference, but the application is in Rails and I am using the Koala Graph api.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您使用评论框社交插件,则可以订阅 comment.create 和 comment.remove 事件,以便运行将传递 id 的回调。
完整详细信息位于此处
If you're using a comments box social plugin, you can subscribe to the comment.create and comment.remove events to enable you to run a callback that will be passed the id.
Full details are here