如何检测好友是否在线?

发布于 2025-01-07 00:39:08 字数 85 浏览 4 评论 0原文

我想创建一个桌面应用程序,每当特定朋友上线时它都会通知我。我的想法是使用聊天 API,但发现它不支持“状态探测”,我想这正是我所需要的。还有其他人这样做吗?

I want to create a desktop application that notifies me whenever a specific friend comes online. My idea was to use the chat API, but found out that it doesn't support "presence probes," which I suppose are what I need. Any other to do so?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

帥小哥 2025-01-14 00:39:08

最好的选择是使用 FQL 用户的 online_presence 字段表

online_presence:用户的 Facebook 聊天状态。返回一个字符串,其中之一是活动的,
空闲、离线或错误(当 Facebook 无法确定状态时
服务器端的信息)。查询不会返回用户的
当该信息因隐私原因受到限制时 Facebook 聊天状态
原因。

要访问此信息,您需要用户向您的应用程序授予 friends_online_presence 权限。

Your best bet is to use the online_presence field of the FQL user table.

online_presence: The user's Facebook Chat status. Returns a string, one of active,
idle, offline, or error (when Facebook can't determine presence
information on the server side). The query does not return the user's
Facebook Chat status when that information is restricted for privacy
reasons.

To access this information you will need user to grant friends_online_presence permission to your application.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文