最后一行显示错误
(function login() {
FB.login(function(response) {
if (response.status === 'connected') {
getElementById('status').innerHTML = 'we are connected.';
} else if (response.status === 'not authorized') {
document.getElementById('status').innerHTML = 'we are not logged in.'
} else {
document.getElementById('status').innerHTML = 'you are not logged into facebook.';
}
});
}
答案 0 :(得分:0)
代码似乎存在多个问题
您的代码看起来像
(function login() {
FB.login(function(response) {
if (response.status === 'connected') {
document.getElementById('status').innerHTML = 'we are connected.';
} else if (response.status === 'not authorized') {
document.getElementById('status').innerHTML = 'we are not logged in.'
} else {
document.getElementById('status').innerHTML = 'you are not logged into facebook.';
}
});
});