gpt4 book ai didi

facebook - FB.getLoginStatus 不起作用?

转载 作者:行者123 更新时间:2023-11-30 05:24:23 25 4
gpt4 key购买 nike

FB.getLoginStatus 函数出于某种原因对我不起作用 - 尽管它曾经有一段时间。下面是非常基本的代码,警报从不弹出——看起来 FB.getLoginStatus 从不调用提供的函数。有什么想法吗?

<body>
<form id="form1" runat="server">
<div id="fb-root">
</div>
<script type="text/javascript" src="http://connect.facebook.net/en_US/all.js"></script>
<script type="text/javascript">
FB.init({ appId: 'xxx', status: true, cookie: true, xfbml: true });
FB.getLoginStatus(function (response) {
alert("Hi there");
});
</script>
</form>

最佳答案

如果您的应用处于沙盒模式,请查看此错误:https://developers.facebook.com/bugs/240058389381072

另请阅读 Philip Bulley 的评论

[...] Essentially sandboxed applications are invisible to non-app-developers. If there is no user currently logged into Facebook, Facebook will act as if your sandboxed application doesn't exist at all (FB obviously doesn't know you're an app developer, and thus the app is invisible!).

已确认并分配此错误。

关于facebook - FB.getLoginStatus 不起作用?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4846951/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com