FB.getLoginStatus not calling its callback

后端 未结 11 1473
半阙折子戏
半阙折子戏 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 13:53

    Maybe you are using the asynchronous call. The same thing happened when I called FB.init with window.fbAsyncInit. All I did was delay the FB.getLoginStatus with a setTimeout function

      window.setTimeout(checkLogStatus, 1000);
    
    
      function checkLogStatus(){
              alert("check");
              // fetch the status on load      
              FB.getLoginStatus(handleSessionResponse);
      }
    

    It seemed to work after that

提交回复
热议问题