このコードを使用して、私のサイトに Facebook 接続ボタンを作成します。
<div id="fb-root"></div>
<script>
window.fbAsyncInit = function() {
FB.init({
apiKey: 'xxxxxxxxxxxxxxxxxxxMQTQ2DshKBkNG4aAZDZD',
appId : 'xxxxxxxxxxxxxxxx', // App ID
channelUrl : '//www.xxx.net/channel.html', // Channel File
status : true, // check login status
cookie : true, // enable cookies to allow the server to access the session
xfbml : true // parse XFBML
});
// Additional initialization code here
};
// Load the SDK Asynchronously
(function(d){
var js, id = 'facebook-jssdk', ref = d.getElementsByTagName('script')[0];
if (d.getElementById(id)) {return;}
js = d.createElement('script'); js.id = id; js.async = true;
js.src = "//connect.facebook.net/en_US/all.js";
ref.parentNode.insertBefore(js, ref);
}(document));
function logOut(){
FB.logout();
}
</script>
<div class="fb-login-button" data-show-faces="false" data-width="200" data-max-rows="1"></div>
<a href="#" onclick="logOut();" >Logout</a>
ログインボタンを押すとログインしますが、ログアウトリンクを押すとFacebookから切断されます(アプリ自体からではありません)
そして、私が次のことをすると: 1. 再度ログインします (facebook.com で直接) 2. 私のサイトに移動します 3. ログインをクリックすると、アプリに既に接続されていると表示されます
私はここで何をしているのですか?