나는이 사용되었습니다에 따르면Facebook 자바 스크립트 기능이 준비되면 어떻게 감지합니까?
function FB_wait() {
if (typeof FB == 'undefined') {
window.setTimeout(FB_wait, 100);
} else {
more();
}
}
를하지만 이건 내 초기화 코드 더 좋은 방법
window.fbAsyncInit = function() {
FB.init({
appId : '<?php echo $conf['fb']['appid']; ?>',
status : true, // check login status
cookie : true, // enable cookies to allow the server to access the session
xfbml : true // parse XFBML
});
FB.Canvas.setAutoResize();
};
(function() {
var e = document.createElement('script');
e.src = document.location.protocol + '//connect.facebook.net/en_US/all.js';
e.async = true;
document.getElementById('fb-root').appendChild(e);
}());
..
FB 스크립트를 비동기 적으로로드합니까? – Anurag
예 .. 코드를 포함 시켰습니다. – Pablo