Like Box Div Code - 如何使用 Dreamweaver 将其放在我的网站上......目前不执行任何操作
这是 Facebook 开发者页面为我的网站提供的代码。我尝试将它单独放入我的代码正文中并与 iframe 一起放入,但无法使其工作。任何帮助表示赞赏。谢谢
<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/en_US/all.js#xfbml=1";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<div class="fb-like-box" data-href="http://www.facebook.com/lapastabella" data-width="292" data-show-faces="true" data-stream="true" data-header="true"></div>
Here is the code that the facebook developer page gave me for my site. I've tried putting it in by itself in the body of my code and with and iframe but cant get it to work. any help is appreciated. thanks
<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/en_US/all.js#xfbml=1";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<div class="fb-like-box" data-href="http://www.facebook.com/lapastabella" data-width="292" data-show-faces="true" data-stream="true" data-header="true"></div>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试更改此行:
至:
他们给您的代码看起来像是一个错误。如果您阅读代码,它会查找 id 为 facebook-jssdk 的对象,但该对象不存在。
Try changing this line:
To:
It looks like an error with the code they give you. If you read the code its looking for an object with an id of facebook-jssdk which doesn't exist.