auto detect facebook session in FB connect sites
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/
精彩评论