認証の一部として自分の Web サイトに Facebook ログインを実装しようとしており、そのために Facebook JavaScript SDK を使用しています。
として単純なコードを使用しました
window.fbAsyncInit = function() {
FB.init({ appId: 'xxxxxxxxxxxxx', //change the appId to your appId
status: true,
cookie: true,
xfbml: true,
oauth: true});
function updateButton(response)
{
if (response.status === 'connected')
{
$('#fb-auth').on('click',function(){
FB.api('/me', function(info) {
login(response, info);
});
//FB.logout(function(response) {
//logout(response);
//});
});
}
else
{
$('#fb-auth').on('click',function(){
FB.login(function(response) {
if (response.authResponse) {
FB.api('/me', function(info) {
login(response, info);
});
}
else {
;
}
}, {scope:'email,user_birthday,status_update,publish_stream,user_about_me'});
});
}
}
FB.getLoginStatus(updateButton);
//FB.Event.subscribe('auth.statusChange', updateButton);
};
Facebook のログインは正常に機能しますが、私がやろうとしているのは、次回 Login with Facebook を試すときに、ログイン ポップアップと別のユーザーとしてログインするオプションが表示されるはずです。
最初のログイン後、次回Facebookで再度ログインしようとして、別のタブでFacebookにログインすると、ポップアップなどなしでログインページにリダイレクトされます。
それを達成するために何をする必要があるかについて、誰かが私にいくつかの指針を教えてください。