2012-03-15 39 views
1

过去几天我一直在努力让我的博客上安装了Facebook评论框,我已经设置了开放图标记,以便我的博客可以被当作Facebook页面。从我在页面上看到的所有东西都可以正常运行,但是当我通过调试器运行我的博客地址时,出现以下错误。开放图调试器工具错误推断属性

这里是链接到我的网站:www.mommysnark.com

这里是错误的调试工具给我:

一个类似按钮警告应该是固定的: OG:标题丢失。 og:title meta标记对于Facebook呈现能够产生高点击率的新闻Feed故事是必需的。

最后,应固定开放图形警示:

推断的特性:“OG:url”属性应该明确规定,即使一个值可以从其他标记推断。

推断属性:即使可以从其他标签推断出值,也应明确提供'og:title'属性。

推断属性:即使可以从其他标签推断出值,也应明确提供'og:description'属性。

看来一切正常,所以这些错误可以忽略吗?

回答

0

您需要更正所有错误以获得最佳结果。物业og:titleog:url对你的目的特别重要。这里是我的博客的开放图表的东西,在formlesspoet.blogspot.com。您可以使用它作为参考:

<!-- BEGIN FACEBOOK OPEN GRAPH --> 
<b:if cond='data:blog.pageType == &quot;archive&quot;'> 
    <meta expr:content='&quot;Posts from &quot; + data:blog.pageName + &quot; at Form and Formlessness&quot;' property='og:title'/> 
</b:if> 
<b:if cond='data:blog.pageType == &quot;index&quot;'> 
<b:if cond='data:blog.searchQuery'> 
    <meta expr:content='&quot;Search results for “&quot; + data:blog.searchQuery + &quot;”&quot; + &quot; at Form and Formlessness&quot;' property='og:title'/> 
</b:if> 
<b:if cond='data:blog.searchLabel'> 
    <meta expr:content='&quot;Posts tagged under “&quot; + data:blog.searchLabel + &quot;”&quot; + &quot; at Form and Formlessness&quot;' property='og:title'/> 
</b:if> 
<b:if cond='data:blog.searchQuery == &quot;&quot;'> 
    <b:if cond='data:blog.searchLabel == &quot;&quot;'> 
    <meta expr:content='&quot;Form and Formlessness&quot;' property='og:title'/> 
    </b:if> 
</b:if> 
</b:if> 
<b:if cond='data:blog.pageType == &quot;item&quot;'> 
    <meta expr:content='&quot;“&quot; + data:blog.pageName + &quot;”&quot; + &quot; at Form and Formlessness&quot;' property='og:title'/> 
</b:if> 
<b:if cond='data:blog.pageType == &quot;static_page&quot;'> 
    <!--Static Page--> 
</b:if> 

<meta content='article' property='og:type'/> 
<meta content='This blog follows an exploration of poetry by Zahhar, going as far back as 1995. Posts include his poetry and articles about poetry, prosody, and poetics.' property='og:description'/> 

<meta expr:content='data:blog.url' property='og:url'/> 
<meta content='http://sphotos.xx.fbcdn.net/hphotos-ash3/538645_3357819035748_1577184006_2624573_712999292_n.jpg' property='og:image'/> 
<meta content='1577184006' property='fb:admins'/> 
<meta expr:content='data:blog.title' property='og:site_name'/> 
<!-- END FACEBOOK OPEN GRAPH --> 

注意,og:title属性设置不同,这取决于你正在看什么样的页面。我试图找到一种方法来进一步优化,但我仍然在等待答案。可以在底部找到og:descriptionog:url属性。请注意,我使用一些Blogger特定的内容来获取og:titleog:url属性的当前页面的标题和URL。你会想要做同样的事情。目前og:description属性是静态的,但我打算最终找到一种方法使其更具多功能性。仍在努力学习如何。用于og:image属性的网址实际上与我的其中一个Facebook相册中的照片链接。