开发者

auto detect facebook session in FB connect sites

开发者 https://www.devze.com 2023-04-13 00:50 出处:网络
a simple problem is that i want when user logged in to Facebook so user automatically logged in to my sites.i have FBconnect implemented in my site .no refresh the page..

a simple problem is that i want when user logged in to Facebook so user automatically

logged in to my sites.i have FBconnect implemented in my site .no refresh the page..

    FB.getLoginStatus(function(response) {
    if (response.session) {

        开发者_运维问答 //what to do here???
          //i dont want to use setTimeout() in this function to check it again & again
    }
   });

any idea how to do this???


It seems like you need...

FB.Event.subscribe('auth.login', function(response) {
  // do something with response
});

https://developers.facebook.com/docs/reference/javascript/FB.getLoginStatus/

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号