title: Facebook Authentication - Unsafe JavaScript attempt to access frame with URL
body: <p>I am trying to implement Facebook Login System into my website.</p>
  
  <p>While it try to connect to facebook, I get an error from console log:</p>
  
  <pre><code>Unsafe JavaScript attempt to access frame with URL https://s-static.ak.fbcdn.net/connect/xd_proxy.php?xxxxxxxxxxxxxxxx
  </code></pre>
  
  <p>I am using JavaScript SDK</p>
  
  <p>I added this in the <code>body</code> tag:</p>
  
  <pre><code>&lt;div id="fb-root"&gt;&lt;/div&gt;
  &lt;script&gt;
      window.fbAsyncInit = function() {
          FB.init({
              appId      : 'xxxxxxxxxxxxxx',
              status     : true, 
              cookie     : true,
              xfbml      : true
          });
      };
      (function(d){
          var js, id = 'facebook-jssdk'; if (d.getElementById(id)) {return;}
          js = d.createElement('script'); js.id = id; js.async = true;
          js.src = "//connect.facebook.net/en_US/all.js";
          d.getElementsByTagName('head')[0].appendChild(js);
      }(document));
      &lt;/script&gt;
  </code></pre>
  
  <p>Facebook Login button:</p>
  
  <pre><code>&lt;div class="fb-login-button"  data-perms="email"&gt;Login with Facebook&lt;/div&gt;
  </code></pre>
  
  <p>I am testing from localhost - I have register my website on facebook develop apps (Site URL: <code>http://localhost</code>)</p>
  
  <p>How to fix this problem? or should I use PHP SDK?</p>
  
  <p>Edit:  Same problem when I uploaded to server with public domain.</p>