FB 图形未加载?

发布于 2024-12-08 21:00:14 字数 1648 浏览 0 评论 0原文

我试图简单地将“赞”按钮添加到我的简单网站中,但我根本没有得到任何图形。我去了 AddThis,他们的实现也不起作用。是我的系统设置不正确还是我犯了菜鸟错误。这是代码,我得到的只是一个带有该段落的红色框。 感谢您的帮助!

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml: lang="en" xmlns:fb="http://www.facebook.com/2008/fbml" xmlns:fb="http://ogp.me/ns/fb#">
<head>
    <title>Facebook button test</title>
</head>

<body>
    <style type="text/css">
        .content p {
            border: 1px solid red;
            position: relative;
        }
        .fb-root {
            border: 3px solid blue;
            height: 200px;
            width: 500px;
            padding: 1em;
            float: right;
        }
        .fb-like {
            border: 10px solid green;
            padding: 1em;
        }   
    </style>

    <div class="content">
        <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>

        <fb:like href="facebook.com/burgessfww" send="true" layout="button_count" width="450" show_faces="false"></fb:like>

        <p> Some text to take up some space and see what's happening!</p>       
    </div>
</body>
</html>

I am trying to simply add the like button to my simple website and I don't get any graphics at all. I went to AddThis and their implementation doesn't work either. Is my system not setup correctly or am I making a rookie mistake. Here is the code and all I get is a red box with the paragraph.
Thanks for any help!

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml: lang="en" xmlns:fb="http://www.facebook.com/2008/fbml" xmlns:fb="http://ogp.me/ns/fb#">
<head>
    <title>Facebook button test</title>
</head>

<body>
    <style type="text/css">
        .content p {
            border: 1px solid red;
            position: relative;
        }
        .fb-root {
            border: 3px solid blue;
            height: 200px;
            width: 500px;
            padding: 1em;
            float: right;
        }
        .fb-like {
            border: 10px solid green;
            padding: 1em;
        }   
    </style>

    <div class="content">
        <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>

        <fb:like href="facebook.com/burgessfww" send="true" layout="button_count" width="450" show_faces="false"></fb:like>

        <p> Some text to take up some space and see what's happening!</p>       
    </div>
</body>
</html>

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

小霸王臭丫头 2024-12-15 21:00:14

我认为问题很简单......但由于我没有测试它你应该!

<html xmlns="http://www.w3.org/1999/xhtml" xml: lang="en" xmlns:fb="http://www.facebook.com/2008/fbml" xmlns:fb="http://ogp.me/ns/fb#">

这似乎是你的错误: XMLNS:FB 两次

xmlns:fb="http://www.facebook.com/2008/fbml" xmlns:fb="http://ogp.me/ns/fb#"

更改它至

xmlns:fb="http://www.facebook.com/2008/fbml" xmlns:og="http://ogp.me/ns/fb#"

致以诚挚的问候

I think the problem is simple... but since I didn't test it You should!

<html xmlns="http://www.w3.org/1999/xhtml" xml: lang="en" xmlns:fb="http://www.facebook.com/2008/fbml" xmlns:fb="http://ogp.me/ns/fb#">

This seems to be your mistake: XMLNS:FB twice

xmlns:fb="http://www.facebook.com/2008/fbml" xmlns:fb="http://ogp.me/ns/fb#"

change it to

xmlns:fb="http://www.facebook.com/2008/fbml" xmlns:og="http://ogp.me/ns/fb#"

best regards

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文