title: FB.login dialog does not close on Google Chrome
body: <p>I'm calling <code>FB.login()</code> 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 <strong>XD Proxy</strong>.</p>
  
  <p>This only happens on Google Chrome (I'm using the latest version available right now for Windows 7). </p>
  
  <p>This doesn't happen if Chrome is in Incognito mode.</p>
  
  <p>The fb-login 'social plugin' works fine on Chrome.</p>
  
  <p>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.</p>
  
  <h2>Sample Code for recreating issue</h2>
  
  <pre class="lang-html prettyprint-override"><code>&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"&gt;
  &lt;html&gt;
      &lt;head&gt;
          &lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8"&gt;
          &lt;title&gt;Chrome Bug Test&lt;/title&gt;
      &lt;/head&gt;
      &lt;body&gt;
          &lt;button onclick="dologin()"&gt;Login using Facebook&lt;/button&gt;
  
          &lt;div id="fb-root"&gt;&lt;/div&gt;
          &lt;script src="http://connect.facebook.net/en_US/all.js"&gt;&lt;/script&gt;
          &lt;script&gt;
            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
            });
          &lt;/script&gt;
  
          &lt;script type="text/javascript"&gt;
              function dologin(){
                  FB.login(function(r){
                      if(console &amp;&amp; console.log) {
                          console.log(r);
                      }
                  });
              }
          &lt;/script&gt;
  
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <h2>Facebook Settings that I've tried changing</h2>
  
  <ol>
  <li>Setting a site domain, didn't change anything.</li>
  <li>Using a custom channelUrl and channel file, didn't help either.</li>
  </ol>
  
  <h2>Related bugs tracked at Facebook</h2>
  
  <ul>
  <li><a href="http://bugs.developers.facebook.net/show_bug.cgi?id=14789" rel="nofollow noreferrer">http://bugs.developers.facebook.net/show_bug.cgi?id=14789</a></li>
  <li><a href="https://github.com/facebook/connect-js/issues/269" rel="nofollow noreferrer">https://github.com/facebook/connect-js/issues/269</a></li>
  <li><a href="http://bugs.developers.facebook.net/show_bug.cgi?id=12112" rel="nofollow noreferrer">http://bugs.developers.facebook.net/show_bug.cgi?id=12112</a></li>
  <li><a href="http://developers.facebook.com/bugs/278247488872084" rel="nofollow noreferrer">http://developers.facebook.com/bugs/278247488872084</a></li>
  </ul>
  
  <h2>Related issues here on Stack Overflow</h2>
  
  <ul>
  <li><a href="https://stackoverflow.com/questions/3895149/blank-popup-with-fb-connect">Blank popup with FB connect</a></li>
  <li><a href="https://stackoverflow.com/questions/5922962/facebook-connect-blank-pop-up-on-chrome">facebook connect blank pop up on chrome</a></li>
  <li><a href="https://stackoverflow.com/questions/1987932/facebook-connect-login-redirecting-in-chrome-and-safari">Facebook Connect Login redirecting in Chrome and Safari</a></li>
  <li><a href="https://stackoverflow.com/questions/4423718/blank-page-with-fb-connect-js-sdk-on-after-permission-request">https://stackoverflow.com/questions/4423718/blank-page-with-fb-connect-js-sdk-on-after-permission-request</a></li>
  <li><a href="https://stackoverflow.com/questions/5778100/facebook-connect-showing-blank-popup-on-login-in-internet-explorer-8">Facebook connect showing blank popup on login in Internet explorer 8</a></li>
  <li><a href="https://stackoverflow.com/questions/4914763/facebook-login-popup-window-stays-open-when-using-fb-login-in-ie">Facebook login popup window stays open when using Fb.login in IE</a></li>
  <li><a href="https://stackoverflow.com/questions/3331073/js-sdk-fb-login-works-but-pop-up-dialog-is-staying-open-after-logged-in/6110099#6110099">JS SDK FB.login() works but pop-up dialog is staying open after logged in</a></li>
  <li><a href="https://stackoverflow.com/questions/7368805/facebook-login-hangs-at-xd-proxy-when-page-is-installed-via-chrome-web-store/9480502">Facebook login hangs at &quot;XD Proxy&quot; when page is installed via Chrome Web Store</a></li>
  <li><a href="https://stackoverflow.com/questions/4615453/xd-proxy-facebook/9480439">XD Proxy Facebook</a></li>
  <li><a href="https://stackoverflow.com/questions/9226894/xd-proxy-popup-wont-close/9256756">XD_Proxy popup won&#39;t close</a></li>
  </ul>
  
  <p>I've seen many people come across this, but what bugs me is that I haven't been able to find a concrete fix for this. Facebook hasn't responded to bug reports yet. One solution would be get rid of Javascript based authentication code and do it solely using serverside mechanism (Facebook PHP SDK). I'd like to avoid that due to time constraints.</p>
  
  <p>Anyone have any ideas how to fix this?</p>