[英]fb:login-button Problems
I'm having troubles with the login tag "fb:login-button". 我在使用登录标签“ fb:login-button”时遇到了麻烦。 If I login works fine, but if I logout it doesn't really logout I have to refresh the page to be completly logged out
如果我可以正常登录,但是如果我没有真正注销,则必须刷新页面才能完全注销
This is the code I use, maybe it can help you. 这是我使用的代码,也许可以为您提供帮助。 Take a look at the events I subscribe to.
看一看我订阅的活动。 After login/logout, it refreshes the page automatically:
登录/注销后,它将自动刷新页面:
window.fbAsyncInit = function() {
FB.init({
appId: '<?php echo $facebook->getAppID() ?>',
cookie: true,
xfbml: true,
oauth: true
});
FB.Event.subscribe('auth.login', function(response) {
window.location.reload();
});
FB.Event.subscribe('auth.logout', function(response) {
window.location.reload();
});
};
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.