title: Facebook from chrome extension - getLoginStatus failing
body: <p>I'm writing a chrome extension which should work with facebook but I'm failing at the beginning: the authorization</p>
  
  <p>The following code</p>
  
  <pre><code>&lt;html&gt;
  &lt;div id="fb-root"&gt;&lt;/div&gt;
  &lt;script type="text/javascript"&gt;
  window.fbAsyncInit = function() {
      FB.init({appId: 'xxx', status: true, cookie: true, xfbml: false});
  
  };
  (function() {
      var e = document.createElement('script');
      e.type = 'text/javascript';
      e.src = 'http://connect.facebook.net/en_US/all.js';
      e.async = true;
      document.getElementById('fb-root').appendChild(e);
  }());
  window.fbAsyncInit = function() {
       FB.init({appId: 'xxx', status: true, cookie: true, xfbml: true});
  
           /* All the events registered */
           FB.Event.subscribe('auth.login', function(response) {
               // do something with response
                  document.write('Not written out');
               //login();
           });
  
           FB.Event.subscribe('auth.logout', function(response) {
               // do something with response
          document.write('Not written out');
               //logout();
           });
  
           arpa = FB.getLoginStatus(function(response) {
          document.write('Not written out');
               if (response.session) 
               {
                   // logged in and connected user, someone you know
              document.write('Not written out');
                   //login();
               }
           else
               { 
                   document.write('Not written out');
               }
           }, true);
  document.write(arpa); // writes out - 'undefined'
  document.write('This is written out');
       };
  &lt;/script&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>isn't working since FB.getLoginStatus function seems not to return anything nor call the callback function and nothing is printed out.</p>
  
  <p>But isn't a wrong line either because the program continue and writes out "undefined" and the last document.write</p>
  
  <p>What could cause this? Logging out from fb don't solve the problem either.</p>