打开图形调试器工具错误推断属性 [英] open graph debugger tool errors inferred property

查看:604
本文介绍了打开图形调试器工具错误推断属性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

过去几天,我一直在为我的博客上安装一个我设置了开放图形标签的Facebook评论框,以便我的博客可以被喜欢作为Facebook页面。从我在页面上可以看到的,似乎都正常运行,但是当我通过调试器运行我的博客地址时,我收到以下错误。



以下是我网站的链接: www.mommysnark.com



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



应该修复:
og:标题丢失。 og:title meta标签对于Facebook呈现一个产生高点击率的新闻Feed故事是必要的。



最后,应该修复的打开图警告:



推断属性:应显式提供'og:url'属性,即使可以从其他标记推断值。



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



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



似乎一切正常,所以这些错误只是被忽略

解决方案

您将要更正所有错误以获得最佳效果。属性 og:title og:url 对于您的目的尤其重要。以下是我的博客中的Open Graph内容,网址为 formlesspoet.blogspot.com 。您可以使用它作为参考:

 <! -  BEGIN FACEBOOK OPEN GRAPH  - > ; 
< b:if cond ='data:blog.pageType ==& quot; archive& quot;'>
< meta expr:content ='& quot来自& quot; + data:blog.pageName +& quot;在Form和Formlessness"'property ='og:title'/>
< / b:if>
< b:if cond ='data:blog.pageType ==& quot'index& quot;'>
< b:if cond ='data:blog.searchQuery'>
< meta expr:content ='& quot搜索结果& quot; + data:blog.searchQuery +& quot;& quot; +&在Form和Formlessness"'property ='og:title'/>
< / b:if>
< b:if cond ='data:blog.searchLabel'>
< meta expr:content ='& quot在& quot下标记的帖子+ data:blog.searchLabel +& quot;& quot; +&在Form和Formlessness"'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"''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; +&在Form和Formlessness"'property ='og:title'/>
< / b:if>
< b:if cond ='data:blog.pageType ==& quot; static_page& quot;'>
<! - 静态页面 - >
< / b:if>

< meta content ='article'property ='og:type'/>
< meta content ='这个博客遵循Zahhar诗歌的探索,早在1995年,他的诗篇和关于诗歌,韵律和诗学的文章包括: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:description og:url 属性。请注意,我正在使用一些Blogger特定的东西来获取 og:title og:url 的当前页面的标题和URL, code>属性。你也想做同样的事情。目前, og:description 属性是静态的,但我打算最终找到一种使其更加通用的方法。仍在努力学习如何。用于 og:image 属性的URL实际上链接到我的一个Facebook相册中的照片。


the past few days I've been working to get a facebook comment box installed on my blog that I've set up with open graph tags so that my blog can be liked as a facebook page. From what I can see on the page, all seems to be functioning normally, but when I run my blog address through the debugger, I get the following errors.

Here is the link to my site: www.mommysnark.com

And here are the errors that the debugging tool gives me:

A like button warning that should be fixed: og:title is missing. The og:title meta tag is necessary for Facebook to render a News Feed story that generates a high clickthrough rate.

And finally, the open graph warnings that should be fixed:

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.

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

It appears that everything is working, so can these errors just be ignored?

解决方案

You'll want to correct all errors for best results. The properties og:title and og:url are especially important to your purposes. Here is the Open Graph stuff from my blog at formlesspoet.blogspot.com. You can use it for reference:

<!-- 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 -->

Note that the og:title property is set differently depending on what sort of page you're looking at. I'm trying to find a way to refine this further, but I'm still waiting on an answer. The og:description and og:url properties can be found near the bottom. Note that I'm using some Blogger specific stuff to get the title and URL of the current page for the og:title and og:url properties. You'll want to do the same. Presently the og:description property is static, but I plan to eventually find a way to make it more versatile. Still working on learning how. The URL used for the og:image property is actually linked to a photo in one of my Facebook albums.

这篇关于打开图形调试器工具错误推断属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆