Google Chrome浏览器上没有关闭FB.login对话框 [英] FB.login dialog does not close on Google Chrome

查看:273
本文介绍了Google Chrome浏览器上没有关闭FB.login对话框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在应用程序中的点击事件上调用 FB.login()。对话框按预期弹出,但是当用户完成登录到Facebook(和/或授权应用程序)时,对话框不会关闭。相反,它会加载一个白页(对话框内),标题更改为 XD代理

I'm calling FB.login() on a click event in my application. The dialog pops up as expected, but when the user is done logging into Facebook (and/or authorizing the app), the dialog does not close. Instead it loads a white page (inside the dialog) and the title changes to XD Proxy.

这只会发生在Google Chrome上(我' m使用Windows 7现有的最新版本)。

This only happens on Google Chrome (I'm using the latest version available right now for Windows 7).

如果Chrome处于隐身模式,则不会发生。

This doesn't happen if Chrome is in Incognito mode.

fb-login'社交插件'在Chrome上可以正常工作。

The fb-login 'social plugin' works fine on Chrome.

为了进一步测试/调试,我创建了一个带有香草设置的新的Facebook应用程序。我所做的唯一更改是在应用设置中设置了网站网址。这是您可以用来重现这个错误的HTML代码。

To test/debug this further, I created a new Facebook App with vanilla settings. The only change I made was set the Site URL in the app settings. Here's HTML code that you can use to recreate this bug.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Chrome Bug Test</title>
    </head>
    <body>
        <button onclick="dologin()">Login using Facebook</button>

        <div id="fb-root"></div>
        <script src="http://connect.facebook.net/en_US/all.js"></script>
        <script>
          FB.init({
            appId  : '[YOUR APP ID HERE]',
            status : true, // check login status
            cookie : true, // enable cookies to allow the server to access the session
            xfbml  : true  // parse XFBML
          });
        </script>

        <script type="text/javascript">
            function dologin(){
                FB.login(function(r){
                    if(console && console.log) {
                        console.log(r);
                    }
                });
            }
        </script>

    </body>
</html>



我尝试更改的Facebook设置



Facebook Settings that I've tried changing


  1. 设置网站域,没有改变任何内容。

  2. 使用自定义的channelUrl和频道文件也没有帮助。 b $ b
  1. Setting a site domain, didn't change anything.
  2. Using a custom channelUrl and channel file, didn't help either.



在Facebook追踪的相关错误



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