0
내 사이트의 페이스 북 로그인 앱을 만들었습니다. 그러나 팝업 차단기가이를 차단합니다. 나는 Google에서 onclick 옵션을 추가한다고 말하면서 검색했습니다. 하지만 여전히 작동하지 않습니다. 나는facebook에서 팝업 차단기가 웹 사이트를 연결하는 것을 방지하려면 어떻게해야합니까?
JS 코드 아래에있는 내 코드를 게시 한 :
$(document).ready(function() {
window.fbAsyncInitialize = function() {
FB.init({
appId : '', // App ID
channelUrl : '..../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
});
FB.getLoginStatus(function(response) {
if (response.status === 'connected') {
// connected
apiCall();
} else if (response.status === 'not_authorized') {
// not_authorized
login();
} else {
// not_logged_in
login();
}
});
};
function login() {
FB.login(function(response) {
if (response.authResponse) {
// connected
apiCall();
} else {
// cancelled
}
}, { scope: 'email' });
}
function apiCall() {
console.log('Welcome! Fetching your information.... ');
FB.api('/me', function(response) {
var first_name = response.first_name;
var last_name = response.last_name;
var fb_id = response.id;
var email = response.email;
});
}
// 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));
});
HTML :
어떻게 변경하거나 팝업 차단 문제를 방지하기 위해 추가해야합니까?
감사