javascript - Conceal Facebook Like 按钮上的计数器

标签 javascript html facebook facebook-like

我有一个带有 Facebook Like 按钮的简单 html 页面:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"  "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml" xmlns:og="http://opengraphprotocol.org/schema/">
<head>
  <script src="http://code.jquery.com/jquery-latest.js"></script>
</head>
<body>

<div id="fb-root"></div>
<script type="text/javascript">

    window.fbAsyncInit = function() {
        FB.init({
            status: true, // check login status
            cookie: true, // enable cookies to allow the server to access the session
            xfbml: true, // parse XFBML
            channelURL: 'http://myurl.com', // channel.html file
            oauth: true // enable OAuth 2.0
        });
    };
    (function(d) {
        var js, id = 'facebook-jssdk'; if (d.getElementById(id)) { return; }
        js = d.createElement('script'); js.id = id; js.async = true;
        js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
        d.getElementsByTagName('head')[0].appendChild(js);
    } (document));


</script>

<fb:like href="http://myurl.com" layout="button_count" show_faces="false" width="450" height="35" action="like" colorscheme="light" font="trebuchet ms" allowTransparency="true"></fb:like>

</body>
</html>

如何 Conceal 按钮旁边的计数器?

非常感谢!

最佳答案

使用 Facebook 提供的 iframe 代码 http://developers.facebook.com/docs/reference/plugins/like然后将其包装在一个具有高度和宽度的 div 中,并 Conceal 溢出。

关于javascript - Conceal Facebook Like 按钮上的计数器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7596286/

相关文章:

html - 如何使 Facebook 评论的宽度为 100%?

php - file_get_contents() -> SSL 操作失败,代码为 1

javascript - jQuery 滚动到顶部并滚动到下一部分

javascript - 定位 div #2

html - 带有在 Safari 中损坏的大小图像的 Flexbox

javascript - 根据条件中的条件渲染事物

javascript - 如何使用 VueJS 在带有按钮的图片周围显示边框?

javascript - 尝试通过 RingCentral 通过网页抓取或通过电子邮件发送 .csv 导出来生成自动每日通话报告

html - 更改谷歌自定义搜索栏的高度

ios - 将 ParseC 用于 Facebook 登录/注册时丢失电子邮件