开发者

using long polling with facebook graph API (for "real-time" notifications)

开发者 https://www.devze.com 2023-04-07 20:21 出处:网络
I\'m looking into implementing a web page to show the user\'s news feed with real-time updates, without using simple polling to the facebook servers.

I'm looking into implementing a web page to show the user's news feed with real-time updates, without using simple polling to the facebook servers.

after browsing through similar questions:

  • How to implement facebook line notification?
  • How does facebook, gmail send the real time notification?
  • Facebook notification system: Is it polling?

As I understand - long polling (see Comet model) is the most preferable way for me to achieve "push"-like events for when a new post is added to a user's feed.

I'm using javascript, on IE browser (6 and above), and the page is actually stored locally, and not on a server.

I'm aware of the real-time updates subscription graph API, but as I mentioned, my page will run locally, not on a server (not even localhost), that's why long polling seems so attractive at the moment.

My question is - does anyone know if and how long polling (or any other Comet model alternative) is available to use via the Facebook API? or maybe any other suggestions?

Thank开发者_JAVA百科s.


I think the only long polling available is for the chat API. Otherwise you're stuck with either real-time updates or using a javascript timer to poll.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号