仅当我在线时才进行 Facebook 直播

发布于 2024-11-18 06:31:15 字数 90 浏览 4 评论 0原文

我想显示一个 Facebook 直播框,但仅限于我在线时。 有没有办法检查我是否在线? 也许用php?

我找到了一些建议,但它们似乎很旧......

I would like to show a facebook livestream box, but only when I'm online.
Is there a way to check if I'm online?
Maybe with php?

I found some suggestions but they seem to be old....

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

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

发布评论

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

评论(2

关于从前 2024-11-25 06:31:15

对于您的帐户,获取具有 user_online_presenceoffline_access 权限的访问令牌。然后,您可以使用该访问令牌运行以下 FQL 查询:

SELECT online_presence from user where uid=me()

然后,如果 online_presence 为“活动”或也可能为“空闲”,则仅在页面上呈现直播插件。

For your account, get an access token with the user_online_presence and offline_access permissions. Then you can run the following FQL query with that access token:

SELECT online_presence from user where uid=me()

Then just only render the livestream plugin on your page if online_presence is 'active' or maybe also 'idle'.

待"谢繁草 2024-11-25 06:31:15
<div class="fb-live-stream"
     data-event-app-id="321046074604304"
     data-width="200"
     data-height="300"
     data-xid="38b9005e85114dc9f71b6781f1d20a12"
     data-via-url="http://viadewakoplax.blogspot.com/"
     data-always-post-to-friends="true"></div>
<div class="fb-live-stream"
     data-event-app-id="321046074604304"
     data-width="200"
     data-height="300"
     data-xid="38b9005e85114dc9f71b6781f1d20a12"
     data-via-url="http://viadewakoplax.blogspot.com/"
     data-always-post-to-friends="true"></div>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文