我正在尝试将Facebook登录添加到我的页面,但是当我登录我的页面后,它不会刷新。
我的按钮:
<p id="log_space"><b onclick="log_ty()" style="cursor:pointer">login</b></p>
,函数log_ty()
是
function log_ty(){
FB.login(function(response) {
if (response.authResponse) {
console.log('Welcome! Fetching your information.... ');
FB.api('/me', function(response) {
console.log('Good to see you, ' + response.name + '.');
});
} else {
console.log('User cancelled login or did not fully authorize.');
}
}, {scope: 'email,user_likes',return_scopes: true});
}