Facebook:点击“赞”按钮后没有进入IE浏览器的评论框

时间:2010-07-02 12:32:15

标签: facebook facebook-like

我用过fb:和og meta标签一样。它适用于除IE以外的所有浏览器。在IE中,当我点击“赞”按钮时,它不会在悬停时显示“分享您的评论框”弹出窗口。但它在所有浏览器中都有。

这是我的代码。

<!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" xmlns:fb="http://www.facebook.com/2008/fbml" xmlns:og="http://opengraphprotocol.org/schema/"> <head>

<meta property="og:title" content="add the Facebook like button"/> <meta property="og:site_name" content="sitename"/> <meta property="og:image" content="http:/www.mysitename.com/images/myimagename.jpg"/> <meta property="og:type" content="article" /> <meta property="og:url" content="http:/www.mysitename.com/home.html"/> <meta property="og:description" content="description comes here"/>

</head> <body>

<div id="fb-root"></div>
    <script>
      window.fbAsyncInit = function() {
      FB.init({ appId: 'myappid', status: true, cookie: true,
                 xfbml: true});
      };
      (function() {
        var e = document.createElement('script');
        e.type = 'text/javascript';
        e.src = document.location.protocol +
          '//connect.facebook.net/en_US/all.js';
        e.async = true;
        document.getElementById('fb-root').appendChild(e);
      }());
    </script>

    <br /> <br /> <fb:like href="http:/www.mysitename.com/home.html" layout="button_count" show_faces="false" width="350"></fb:like> <br /><br />

</body> </html>

1 个答案:

答案 0 :(得分:0)

添加以下属性,使其适用于IE:

<html xmlns:og="http://opengraphprotocol.org/schema/"
      xmlns:fb="http://www.facebook.com/2008/fbml">