title: JS SDK FB.login() works but pop-up dialog is staying open after logged in
body: <p>I am using the JS SDK for Facebook based on the NEW GraphAPI for Auth/Login.</p>
  
  <p>Has anyone had this issue when logging in after <code>FB.login()</code> was called via the JS SDK?</p>
  
  <p><strong>The problem:</strong> after I initialize by calling <code>FB.Init()</code> asynchronously (because this all wrapped in a <code>window.fbAsyncInit</code> function) the login pops up; I log in but then that pop-up refreshes to show a white page and the pop-up stays open and does not close...why?  I am waiting to check response.session in the <code>FB.login()</code> callback but it seems as though I never get it back because this pop-up seems to just stick there and the process appears to just halt after you're logged in and I just figured this pop-up would just close and return me the response.session in the callback automatically.  Why would that pop-up not go away?</p>
  
  <p>I copied the url from the pop-up after I'm logged in and showing white the following url so it looks like the response is there but then why isn't that pop-up window closing so my callback can handle the response??</p>
  
  <pre><code>http://static.ak.fbcdn.net/connect/xd_proxy.php#?=&amp;cb=f18fe0b7c66da54&amp;origin=http%3A%2F%2Flocalhost%2Ff3745f32ed63a7a&amp;relation=opener&amp;transport=postmessage&amp;frame=f18adb488566372&amp;result=user_photos&amp;session={%22session_key%22%3A%222.vH4SVCisnh8HJWjEI1Vy_Q__.3600.1280106000-100001379631246%22%2C%22uid%22%3A%22100001379631246%22%2C%22expires%22%3A1280106000%2C%22secret%22%3A%22TH45WFg8I_5r_cOoVIujjg__%22%2C%22access_token%22%3A%22132444323462464|2.vH4SVCisnh8HJWjEI1Vy_Q__.3600.1280106000-100001379631246|q123iPQcKY45xWXtOZ2ebOOZTQQ.%22%2C%22sig%22%3A%22a75e85af2354292bfdcf90b9d319ebf7%22}
  </code></pre>
  
  <p>I did notice that when FB.login() is called and the login pop-up comes up, I see this error in FireBug talking about how it doesn't like the fact that I'm testing over localhost or something I guess:</p>
  
  <p>uncaught exception: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMLocation.host]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: chrome://smarterwiki/content/smarterwiki.js :: anonymous :: line 1225" data: no]</p>
  
  <p>that error bothers me...I need to figure out why it's coming up and I bet you I'm not the only one who has seen this when testing locally.  I see no info though on troubleshooting this on the net anywhere either on the Facebook forums or elsewhere.  I see others have had this issue but no resolution. </p>
  
  <p>So when you implemented yours, did your facebook pop-up just close after the user is logged in or did you need to do something special to finish this process?</p>
  
  <p>Also, I notice if I manually close that pop-up then go to check if that cookie was generated to contain my session, it's not (the <code>fbs_[yourappid]</code> cookie).  So it looks like something ends prematurely here.  I've got in my init cookie: true so I wonder if this problem were the pop-up dialog is not closing is related to the cookie also not being created client-side on my test PC.</p>