title: Facebook Integration Into Webpage
body: <p>I am trying to integrate Facebook into my webpage so users can update their status from my site. Right now I have a button a user clicks to update their status, the button calls the updateFacebookStatus() function. When this button is clicked right now, a blank white window pops up saying "waiting for www.facebook.com". This window is where it should be asking for permission but the window just times out. Any ideas: Here is my code for the function updateFacebookStatus().</p>
  
  <pre><code>    function updateFacebookStatus()
      {
  
  //Ask for permissions
      FB.login(function(response) 
      {
  
      }, {scope:'publish_stream, offline_access,manage_pages'});
  
       FB.getLoginStatus(function(response) 
       {
  
  //If user is logged it and given permissions update status
        if (response.status === 'connected') 
        {
  
          new_status = document.getElementById('FacebookBody').value;
  
          //update status
          FB.api(
          {
              method: 'status.set',
              status: new_status
          },
          function(response)
          {
              if(response == 0)
              {
                  alert("Your Facebook Status Was Not Updated.");
              }
              else
              {
                  alert("Your Facebook Status Was Updated");
              }
          }
  
        );} 
        else 
        {
          window.location.href = "#home";
        }
       });
      }
  </code></pre>
  
  <p>In my html file I get the Facebook javascript sdk using the following code:</p>
  
  <pre><code>        &lt;script src="http://connect.facebook.net/en_US/all.js"&gt;&lt;/script&gt;
          &lt;script&gt;
                FB.init({
                  appId  : 'XXXXXXXXXXXXX',
                  status : true, // check login status
                  cookie : true, // enable cookies to allow the server to access the session
                  xfbml  : true, // parse XFBML
                  channelUrl : 'http://www.XXXXX.com/channel.html', // channel.html file
                  oauth  : true // enable OAuth 2.0
                });
  
                // Load the SDK Asynchronously
                (function(d){
                   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 = "//connect.facebook.net/en_US/all.js";
                   ref.parentNode.insertBefore(js, ref);
                 }(document));
          &lt;/script&gt;
  </code></pre>