โค้ด: เลือกทั้งหมด
<fb:login-button id="facebook_login" scope="public_profile,email" onlogin="checkLoginState();">
</fb:login-button>
โค้ด: เลือกทั้งหมด
if (response.status === 'connected') {
// Logged into your app and Facebook.
Login_hompage();
} else if (response.status === 'not_authorized') {
alert('3333');
jQuery('#facebook_login').submit();
// The person is logged into Facebook, but not your app.
document.getElementById('status').innerHTML = 'Please log ' +
'into this app.';
} else {
// The person is not logged into Facebook, so we're not sure if
// they are logged into this app or not.
jQuery('#facebook_login').submit();
document.getElementById('status').innerHTML = 'Please log ' +
'into Facebook.';
alert('555');
}