fbjs:获取当前登录用户的uid

发布于 2024-08-20 02:02:00 字数 137 浏览 1 评论 0原文

我必须为我当前的应用程序使用fbjs。 我之前使用过 api.requireLogin 函数,但后来我查看了文档,发现该函数已被弃用并建议使用 FB.Connect.requireSession() 代替。

我想知道如何获取当前用户的uid?

i have to use fbjs for my current app.
i was using the api.requireLogin function earlier but then i looked over at the docs and found the function has been deprecated and suggested to use FB.Connect.requireSession() instead.

I wanted to know how do i get the uid of the current user?

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

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

发布评论

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

评论(1

残龙傲雪 2024-08-27 02:02:00

假设您指的是 Facebook Connect 而不是 FBJS,因为它们是不同的东西。 (FBJS 仅在 FBML 应用程序内部运行,Facebook Connect 在 iF​​rame 应用程序外部运行,外部网站。)

但在 Connect 中:

FB. Connect.get_loggedInUser();

Assuming you mean Facebook Connect and not FBJS as they're different things. (FBJS only runs inside FBML apps, Facebook Connect runs outside in iFrame apps and external websites.)

But in Connect:

FB.Connect.get_loggedInUser();

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