我的一切看起来都很好.
我可以建议的是
>在异步中初始化javascript sdk并将其代码放在标记给它加载的时间. “它在14次尝试中失败了1次,这就是我建议的原因.
https://developers.facebook.com/docs/reference/javascript/
>使用channel html文件加快Internet Explorer的加载速度.
这是我如何使用parse xfbml和async javascript呈现我的登录按钮的示例.
window.fbAsyncInit = function() {
FB.init({
appId : '135669679827333',
status : true, // check login status
cookie : true, // enable cookies to allow the server to access the session
xfbml : true, // parse XFBML
channelUrl : 'https://anotherfeed.com/emo/channel.html', // channel.html file
oauth : true // enable OAuth 2.0
});
function loginbutton(){
var loginb=document.getElementById('loginbutton');
loginb.innerHTML='
FB.XFBML.parse(loginb);
};
loginbutton();
};
// Load the SDK Asynchronously
(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_US/all.js#xfbml=1&appId=135669679827333";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));