我最近增加像按钮Facebook的,但下面的代码在Chrome中返回一个错误:遗漏的类型错误:对象#有没有方法“提供”Facebook的喜欢:遗漏的类型错误:对象#<an Object>没有方法“提供”
<!-- Facebook -->
<div id="fb-root"></div>
<script>
window.fbAsyncInit = function() {
FB.init({appId: '121814204514513', status: true, cookie: true,
xfbml: true});
};
(function() {
var e = document.createElement('script'); e.async = true;
e.src = document.location.protocol +
'//connect.facebook.net/en_US/all.js';
document.getElementById('fb-root').appendChild(e);
}());
</script>
<!-- Facebook -->
像按钮的作品,但错误是anoying,有谁知道如何解决?
感谢
我也有这个问题,你有没有找到一个解决方案? – 2010-12-31 17:14:26
不确定它是否相关,但你可以尝试使用它作为你的html头文件:<!DOCTYPE HTML PUBLIC“ - // W3C // DTD HTML 4.01 // EN”“http://www.w3.org/TR/ html4/strict.dtd“> – Roch 2010-12-31 20:38:41