title: Javascript: My fbAsyncInit() method never gets called
body: <p>I'm copying the code right out of <a href="https://developers.facebook.com/docs/reference/javascript/%5C" rel="noreferrer">this page</a> on Facebook's developer website and the fbAsyncInit() method never fires.  I've also read <a href="http://af-design.com/blog/2011/05/24/key-facebook-javascript-principles/" rel="noreferrer">this page</a>, I've tweaked the code quite a few different ways, and I cannot get the method to fire.  Your thoughts?  </p>
  
  <p>Also, for what it's worth, when I try and run this code and Chrome (on Mac) and run Firebug lite, I get an error that says "Firebug Lite cannot be loaded in this page"</p>
  
  <p>Here's the code...</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;div id="fb-root"&gt;&lt;/div&gt;
  &lt;script type="text/javascript"&gt;
    window.fbAsyncInit = function() {
      FB.init({
        appId      : '1234567890', // App ID
        channelUrl : '//localhost/test.html', // Channel File
        status     : true, // check login status
        cookie     : true, // enable cookies to allow the server to access the session
        xfbml      : true  // parse XFBML
      });
  
      alert("this statement never gets called either");
    };
  
    // Load the SDK Asynchronously
    (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;
  &lt;/script&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>