title: "Failed to load resource" using Facebook's example code
body: <p>I'm trying to run the first example from the documentation of the Facebook JS SDK.  I created a new app, created a blank document called "facebookTest.html", pasted in the code from the example, and plugged in the new app's App ID.  Code as follows:</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
  &lt;title&gt;Login with facebook&lt;/title&gt;
  &lt;div id="fb-root"&gt;&lt;/div&gt;
  &lt;script&gt;
    window.fbAsyncInit = function() {
      // init the FB JS SDK
      FB.init({
        appId      : 'my app ID', // App ID from the App Dashboard
        status     : true, // check the login status upon init?
        cookie     : true, // set sessions cookies to allow your server to access the session?
        xfbml      : true  // parse XFBML tags on this page?
      });
  
      // Additional initialization code such as adding Event Listeners goes here
  
    };
  
    // Load the SDK's source Asynchronously
    // Note that the debug version is being actively developed and might 
    // contain some type checks that are overly strict. 
    // Please report such bugs using the bugs tool.
    (function(d, debug){
       var js, id = 'facebook-jssdk', ref = d.getElementsByTagName('script')[0];
       if (d.getElementById(id)) {return;}
       js = d.createElement('script'); js.id = id; js.async = true;
       js.src = document.location.protocol+"//connect.facebook.net/en_US/all" + (debug ? "/debug" : "") + ".js";
       ref.parentNode.insertBefore(js, ref);
     }(document, /*debug*/ false));
  &lt;/script&gt;
  </code></pre>
  
  <p>When I load the page, on the Javascript console I get the following error message:</p>
  
  <p><code>Failed to load resource</code></p>
  
  <p>What am I doing wrong?</p>
  
  <p>EDIT: When I add <code>document.location.protocol</code> before the <code>"//connect.facebook.net/..."</code>, as suggested <a href="https://stackoverflow.com/a/9849572/619177">here</a>, the screen stays blank, and the console shows the following:</p>
  
  <pre><code>GET file://connect.facebook.net/en_US/all.js  
  </code></pre>
  
  <p>Is that all this code is supposed to do?  Or is it still failing?</p>