Facebook SDK ile web sitelerini geliştirmekte yeniyim. Yani lütfen benimle kal.getLoginStatus her zaman not_authorized döndürür
Aşağıda Facebook'a giriş yaptığımı doğrulamak için kullanacağım basit kod. Herhangi bir nedenden dolayı, uygulamamın tek geliştiricisi olmama rağmen her zaman 'not_autherized' yanıtını alıyorum. Sağladığım uygulama numarası doğru.
<!DOCTYPE html>
<html lang="en">
<head>
</head>
<body>
<div id="fb-root"></div>
<script>
window.fbAsyncInit = function() {
// init the FB JS SDK
FB.init({
appId : 'censored app id', // App ID from the app dashboard
status : true, // Check Facebook Login status
cookies : true,
xfbml : true // Look for social plugins on the page
});
FB.getLoginStatus(checkLoginStatus);
function checkLoginStatus(response) {
if (response && response == 'connected') {
alert('User is authorized!');
} else {
alert('User not authorized!!!');
}
};
// Additional initialization code such as adding Event Listeners goes here
};
// Load the SDK asynchronously
(function(d, s, id) {
if (d.getElementById(id)) return;
var js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_US/all.js";
var fjs = d.getElementsByTagName(s)[0];
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
</script>
</body>
</html>
Gözardı ettiğim bir şey var mı?
Çok takdir :)