我的Facebook喜欢按钮不显示 [英] My facebook like button is not showing up

查看:135
本文介绍了我的Facebook喜欢按钮不显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我看过以前有关Facebook的问题,像按钮,没有看到任何我的代码错误。这是我有的:

I looked at previous asked questions about the facebook like button and didnt see anything that was wrong with my code. Here is what I have:

<body>

 <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>


</body>


推荐答案

添加了用于初始化Facebook的Javascript SDK的代码后还必须添加代码以在所需的位置显示Like按钮。其通用代码是

After adding the code for initializing the Facebook's Javascript SDK you also have to add the code to display the Like button at the required place. The generic code for it is

<div class="fb-like" data-send="true" data-width="450" data-show-faces="true">
</div>

如果您希望您可以通过检查文档这里

If you want you can further customize it by checking documentation here.

这篇关于我的Facebook喜欢按钮不显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆