如何为Facebook设置打开图标标记按钮?
我在我的页面的下列元素:如何为Facebook设置打开图标标记按钮?
<!doctype html>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:og="http://ogp.me/ns#"
xmlns:fb="https://www.facebook.com/2008/fbml">
<head>
...
<meta property="og:title" content="testitle"/>
<meta property="og:url" content="http://www.hoteljo.de"/>
<meta property="og:image" content="http://www.hoteljo.de/images/button-60.png"/>
<meta property="og:type" content="website"/>
<meta property="og:site_name" content="site name"/>
<meta property="fb:app_id" content="id"/>
<meta property="fb:admins" content="1160534546"/>
<meta property="og:description" content="description"/>
</head>
<body>
<div id="fb-root"></div>
<script type="text/javascript">
window.fbAsyncInit = function() {
FB.init({appId: 'id',
status: true,
cookie: true,
xfbml: true});
};
(function() {
var e = document.createElement('script'); e.async = true;
e.src = document.location.protocol +
'//connect.facebook.net/de_DE/all.js';
document.getElementById('fb-root').appendChild(e);
}());
</script>
<fb:like href='http://www.hoteljo.de' send='false' layout='button_count'
show_faces='false' font='verdana'></fb:like>
我插入在头部的开口的图形描述和包括在Facebook的像体元件内部按钮。 但仍然在https://developers.facebook.com/tools/debug我得到错误。我需要改变什么?
这里的问题是页面http://www.hoteljo.de通过302 HTTP代码重定向到http://www.hoteljo.de/signup。所以Facebook无法从主页http://www.hoteljo.de解析OpenGraphs!
您应该尝试删除该重定向或使用javascript进行设置(因为这是临时重定向)。
你有一个圆形的重定向路径错误:
看到https://developers.facebook.com/tools/debug/og/object?q=http%3A%2F%2Fwww.site.de
您的原始URL(http://www.site.de/)链接到另一个URL(HTTPS://www.office- site.de/),它通过你等等的rel =“canonical”链接链接回你原来的URL(http://www.site.de/)。
决定你的规范网址是什么,并坚持这一点。
http://www.site.de/不是感兴趣的网站。 我的网站是http://www.hoteljo.de – confile
我修正了这个问题,但正如你在https://developers.facebook.com/tools/debug/og/object?q=www.hoteljo.de上看到的那样还是行不通。我还可以做些什么? – confile
嗯...看不到任何其他问题,可能会导致此错误消息o_o ... 更奇怪:https://developers.facebook.com/tools/debug/og/echo?q = http%3A% 2F%2Fwww.hoteljo.de Facebook似乎从您的服务器根本没有收到任何答复... 对不起,没有在这里帮助你。 –
当我点击时,就像我在我的Facebook墙上看到一个不同于我指定的图像: 为什么这样呢? – confile