Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

FB.getLoginStatus not calling its callback

Tags:

The title really says it all. Under some (undetermined) conditions FB.getLoginStatus() just stops working and won't invoke the callback I gave it. The only interesting clues I've found are

  • FB.Auth._loadState is stuck on "loading" -- whatever is supposed to make it click over to "loaded" isn't happening
  • slight delays like putting in alert() calls tend to make it start working

Any hints at all about even how to investigate this welcome.

like image 532
Michael Lorton Avatar asked Mar 04 '11 03:03

Michael Lorton


1 Answers

This usually happens for me when I am running the page under a different domain from what has been registered in Facebook. Typically this is when I am developing locally.

If you are running locally, you'll have to set up a local web server and then modify your hosts file to point the the registered domain to 127.0.0.1 in order to test on your local machine. Don forget to remove that line from the hosts file when you want to test it on the server.

like image 73
Jeff Avatar answered Sep 21 '22 04:09

Jeff



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!