当我在og:image
元标记中指定图像时,我不知道为什么 facebook like 按钮会从网站主页上拉出随机图像。
这是html:
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://ogp.me/ns/fb#">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>Keeper Local</title>
<meta name="description" content="Keeper Local"/>
<meta name="keywords" content="Keeper Local"/>
<meta property="og:title" content="KeeperLocal"/>
<meta property="og:url" content="http://www.keeperlocal.com"/>
<meta property="og:image" content="http://keeperlocal.com/images/keeperlocallogo.jpg"/>
<meta property="og:description" content="Local shopping"/>
<meta property="og:site_name" content="KeeperLocal.com"/>
<meta property="og:type" content="website"/>
</head>
<body>
<img src="http://keeperlocal.com/images/keeperlocallogo.jpg">
<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>
<div id="page-wrap">
<fb:like url="http://www.keeperlocal.com/test.html" send="false" layout="box_count" show_faces="false" width="50" height="40" action="like" colorscheme="light"></fb:like>
</div>
</body>
</html>
如果您想实时查看此测试页面,请访问 http://www.keeperlocal.com/test.html 。为什么og:image
元标记被忽略?