0
我一直在閱讀關於這個主題的幾個答案,但我無法讓它工作。這是我正在嘗試:Facebook登錄JSDK警報?
window.fbAsyncInit = function() {
FB.init({
appId : '247886858583094',
status : true,
cookie : true,
xfbml : true,
oauth : true,
});
FB.Event.subscribe('auth.login',function(response) { alert('You logged in'); });
};
(function(d){
var js, id = 'facebook-jssdk'; if (d.getElementById(id)) {return;}
js = d.createElement('script'); js.id = id; js.async = true;
js.src = "//connect.facebook.net/en_US/all.js";
d.getElementsByTagName('head')[0].appendChild(js);
}(document));
我該如何添加以獲得用戶登錄提醒?
範圍內。但它不顯示警報。 http://lujanventas.com/entrar/index2.php – lisovaccaro
將它放在window.fbAsyncInit = function() –
的範圍內我剛更改了代碼,但它仍然無法工作。 (我編輯了該問題以匹配它) – lisovaccaro