如何通过监听获取的实时状态通知与Facebook SDK实时、状态、通知、SDK

2023-09-05 08:28:51 作者:ザ忘不掉ダ

我使用Twitter4j和Android Facebook的SDK来获取状态信息。随着Twitter4J我收到实时通知,每当一个新的状态已经通过 StatusListener (Twitter4J)添加到流。 在Facebook的SDK,我不能找到一个类似的方式,使用 RequestListener (Facebook的SDK)在一个固定的时间间隔我只能取整流一遍又一遍,据我看到它。

I'm using Twitter4j and the Android Facebook SDK to fetch status messages. With Twitter4J I get real-time notifications whenever a new status has been added to the stream via StatusListener (Twitter4J). In the Facebook SDK I cannot find a similar way, I can only fetch entire streams over and over again in a fixed time interval using RequestListener (Facebook SDK) as far as I see it.

有没有什么办法的新状态实时与Facebook的SDK以类似的方式得到通知,与Twitter4J?

Is there any way to get notified of new statuses in realtime with the Facebook SDK in a similar way as with Twitter4J?

(在这里找到一个类似的,但没有答案的问题:Facebook实时更新的应用程序墙)

(Found a similar but unanswered question here: Facebook real-time updated application wall)

推荐答案

有一个实时API

http://developers.facebook.com/docs/api/realtime

但它仅适用于服务器到服务器的通信,所以它不是一个真正有用的,如果你已经是没有服务器基础架构,你的应用程序可以订阅一个移动应用程序 - 这正是我一直在寻找我的具体情况。

but it's only for server-to-server communication, so it's not really useful if all you have is a mobile app without a server infrastructure that your app can subscribed to - which is what I was looking for in my particular case.

请参阅的Q&放大器; A在 HTTP://forum.developers.facebook。净/ viewtopic.php?ID = 56610

See the Q&A at http://forum.developers.facebook.net/viewtopic.php?id=56610