페이지에 XFBML 주석 상자를 구현하려고합니다. Firefox 및 Chrome에서 작동하지만 Internet Explorer 8에서는 산발적으로 만 작동합니다.Facebook XFBML 및 Internet Explorer 8 비동기로드의 문제
페이지가 FB.XFBML.parse('fb-stuff');
에 도달하면 'FB is undefined'오류가 발생합니다. XFBML을 구문 분석하기 전에 Facebook Connect 스크립트가로드를 완료했는지 확인해야합니까? 이미 fbAsyncInit에 당신을 위해 할 수있는 페이스 북의 초기화를 지시하고 있기 때문에 당신은 자신 fb.xfbml.parse 호출 할 필요는 없습니다
<script type="text/javascript">
window.fbAsyncInit = function() {
FB.init({
appId : '117378991625799',
status : false, // check login status
cookie : false, // enable cookies to allow the server to access the session
xfbml : true // parse XFBML
});
};
(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.XFBML.parse('fb-stuff');
}());
</script>