FB.getLoginStatus not calling its callback

后端 未结 11 1464
半阙折子戏
半阙折子戏 2021-02-18 13:11

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

11条回答
  •  广开言路
    2021-02-18 14:06

    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.

提交回复
热议问题