一个简单的问题是,当用户登录到Facebook时,我希望用户自动使用 登录到我的sites.i在我的网站上实现了FBconnect。没有刷新页面..
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
}
});
任何想法怎么做???
答案 0 :(得分:1)
好像你需要......
FB.Event.subscribe('auth.login', function(response) {
// do something with response
});
https://developers.facebook.com/docs/reference/javascript/FB.getLoginStatus/