Facebook实时更新应用程序墙 [英] Facebook real-time updated application wall
问题描述
这个墙的帖子必须自动为每个应用用户更新。
实现这种应用的最好方法是什么?
我已经计划在FBML页面和定期的AJAX请求中使用到服务器(FBJS)。当一个用户发布内容时,这个帖子将通过使用这些AJAX请求(格式 - JSON)返回给每个人。
可能是,有最好的方法吗?
我也在夜总会网站上使用它。 Facebook的请求是客户端,所以它不会给我服务器的性能问题。
从X到X秒,我打电话给Facebook。你可以做的是不要在每次打电话给Facebook时更新你的内容元素(例如div)。相反,请使用最后一个注释ID的隐藏字段,当您打电话给Facebook时,请检查上次返回的注释ID是否与隐藏字段相同。
I want to add real-time update wall in my facebook canvas application. The posts of this wall must update automatically for every application user. What is the best way to realize such application?
I have planned to use with in FBML page and periodic AJAX requests to the server (FBJS). When one user post something, this post will be returned to everybody by using these AJAX requests (format - JSON)
May be, there are a best way to do it?
I'm using it too on a night club website. The facebook request are client-side, so it doesn't give me performance problems to the server.
From X to X seconds, i make those calls to Facebook. What you can do is to don't update your content element (div for example) every time you make a call to Facebook. Instead, use an hidden field with the last comment id for example, and when you make the call to Facebook check if the last returned comment id is the same as your hidden field.
这篇关于Facebook实时更新应用程序墙的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!