我在前面栏(主页)的PHP小部件代码阅读器中插入了由Facebook提供的以下代码和SDK:
<div id="fb-root"></div>
<script>(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/pt_PT/all.js#xfbml=1&appId=162098443986551";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<div id="fb-root"></div>`
<script>
window.fbAsyncInit = function() {
// init the FB JS SDK
FB.init({
appId : '162098443986551', // App ID from the app dashboard
channelUrl : '//findout-macau.com/channel.html', // Channel file for x-domain comms
status : true, // Check Facebook Login status
xfbml : true // Look for social plugins on the page
});
// Additional initialization code such as adding Event Listeners goes here
};
// 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";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
</script>`
工作正常,但突然不再显示了。
我的问题是要知道如何弄清楚发生了什么以便尝试修复它......我的域名是http://findout-macau.com
答案 0 :(得分:0)
你确定应该有两个具有相同ID的div吗?
<div id="fb-root"></div>
在您的代码中出现两次。