-1

我在 jboss-web.deployer\ROOT.war 中创建了一个名为 test.html 的测试页面。

我添加了 facebook like button 和 OG meta 标签。当我点击喜欢时,标题和描述不会在 Facebook 上共享。当我点击喜欢按钮时,即使我无法在弹出窗口中看到。请帮忙....

请找到以下代码:

<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:og="http://ogp.me/ns#"
      xmlns:fb="https://www.facebook.com/2008/fbml">
  <head>
    <title>The Rock (1996)</title>
    <meta property="og:title" content="The Rock"/>
    <meta property="og:type" content="movie"/>
    <meta property="og:url" content="http://www.imdb.com/title/tt0117500/"/>
    <meta property="og:image" content="http://ia.media-imdb.com/rock.jpg"/>
    <meta property="og:site_name" content="IMDb"/>
    <meta property="fb:admins" content="USER_ID"/>
    <meta property="og:description"
          content="A group of U.S. Marines, under command of
                   a renegade general, take over Alcatraz and
                   threaten San Francisco Bay with biological
                   weapons."/>
     </head>

 <body>
    <!-- AddThis Button BEGIN --> 
<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="href="http://157.241.56.242:8080/Test5.html" width="450" height="80"/>

<!-- AddThis Button END -->

</body>
</html>
4

1 回答 1

0

您不需要添加 XML 命名空间,而是添加前缀。以下是来自http://ogp.me/的令牌:

<html prefix="og: http://ogp.me/ns#">
于 2012-08-06T06:17:19.593 回答