FB.getLoginStatus不起作用? [英] FB.getLoginStatus doesn't work?

查看:131
本文介绍了FB.getLoginStatus不起作用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于某种原因,FB.getLoginStatus功能对我来说不起作用 - 虽然它曾经有一段时间了。
以下非常基本的代码,并且警报永远不会弹出窗口 - 看起来像FB.getLoginStatus从不调用提供的函数。
任何想法?

The FB.getLoginStatus function doesn't work for me for some reason - although it used to for some time. Very basic code below, and the alert never popups - looks like FB.getLoginStatus never calls the supplied function. Any ideas ?

<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

If your app is in Sandbox Mode see this bug: https://developers.facebook.com/bugs/240058389381072

同时阅读Philip Bulley的评论

Also read the comments by Philip Bulley


[... ]非应用程序开发人员基本上是沙盒应用程序是不可见的。如果目前没有用户登录Facebook,Facebook将会像您的沙盒应用程序一样不起作用(FB显然不知道您是应用程序开发人员,因此该应用程序不可见!)。

[...] 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!).

此错误已被确认并分配。

This bug has been confirmed and assigned.

这篇关于FB.getLoginStatus不起作用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆