Facebook打开图表og:和fb:标签无法正常工作或正在注册

时间:2012-11-05 02:17:39

标签: facebook facebook-opengraph

我有一个网站,我想要一个像facebook一样的按钮,按钮是自定义的,所以它显示特定的图片,描述等。

所有这一切都已完成且有效,但是我使用了常规的img,description,title元标记而不是我们应该使用的og标签。

当我用http://developers.facebook.com/tools/debug点击网站时,Facebook会抱怨。

以下是一些错误消息:

Inferred Property:  The 'og:url' property 
should be explicitly provided, even if a value can be inferred from other tags.

Inferred Property:  The 'og:title' property
should be explicitly provided, even if a value can be inferred from other tags.
所有其他标签的

等等......

问题在于:当我按照网络上提供的示例添加和配置标记时,不仅没有成功,我收到了另一个错误:

Meta Tags In Body:  You have tags ouside of your . This is either because
your was malformed and they fell lower in the parse tree, or you accidentally 
put your Open Graph tags in the wrong place. Either way you need to fix it 
before the tags are usable.

这是我的html配置:

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

         ...               

<meta property="og:url" content="..." />
<meta property="og:site_name" content="..." />
<meta property="og:type" content="..." />
<meta property="og:title" content="..." />
<meta property="og:image" content="..." />
<meta property="og:description" content="..." />
<meta property="fb:app_id" content="..." />

...

注意:我的fb-root标签和另一个提供类似按钮代码的fb位于页面的最底部以及其他脚本。

注意:我在开放图表的网站上,或在我的应用程序的facebook的开放图形部分,在Facebook开发人员中进行了零配置,但我不认为这是一个问题,因为在fb的说明中,他们说要添加一个像只需按钮复制/粘贴代码,不需要实际的开放图形配置。

以下是网站网址:http://darehut.com 注意:我的标签代码实际上在我的源代码中的head元素内部,但无论出于何种原因,它们都会在外部呈现!

感谢您的帮助!!

1 个答案:

答案 0 :(得分:0)

  

正文中的元标记:你有你的标记。这要么是因为   你的格式错误,他们在解析树中跌倒了,或者你不小心   将您的Open Graph标记放在错误的位置。

该消息在第一个句号之前缺少单词<head>

这意味着什么,非常简单:要么将OG元标记放在<head>元素之外,要么HTML格式不正确。


下次你提出这样的问题时,请在你遇到问题的文件中加入网址 - 这样,我们可以自己查看一下,我们就能更具体地回答。< / p>