我正在我的网站上调试 Open Graph 标签(示例页面)。
我正在努力修复从 Facebook 调试工具收到的错误。错误是:
解析器元数据不匹配:
此元数据的解析器结果与输入元数据不匹配。这可能是由于数据以意外方式排序、为仅期望单个值的属性给出多个值或给定属性的属性值不匹配而引起的。以下是解析结果中未看到的输入属性 => 内容对: 'article:published_time => 2012-07-07'
我相信我正在正确格式化文章:published_time 标记根据文档,月份和日期前导零,四位数年份,并按年月日排序。它也以与示例相同的顺序出现。
以下是原始开放图谱标签:
Meta Tag: <meta property="fb:app_id" content="407390309287595" />
Meta Tag: <meta property="og:type" content="article" />
Meta Tag: <meta property="og:url" content="http://www.zujava.com/how-to-make-a-book-cover" />
Meta Tag: <meta property="og:site_name" content="Zujava.com" />
Meta Tag: <meta property="og:image" content="http://assets1.zujava.com/sites/default/files/3781/how-to-make-a-book-cover/book-cover.jpg" />
Meta Tag: <meta property="og:title" content="How to Make a Book Cover" />
Meta Tag:
<meta property="og:description" content="Preparing to go back to school can be expensive. Buying book covers should not be one of your expenses because it is so easy to make your own book covers for no cost at all. It takes less than 5 minutes to make a book cover and it doesn&#039;t require any tools or extra supplies. You can make your own book covers out of paper bags, construction paper, bubble wrap, wrapping paper and other recyclable materials that you probably already have in your home. Once you cover your book you can decorate it by doodling on the front or adding stickers." />
Meta Tag: <meta property="article:published_time" content="2012-07-07" />
Meta Tag: <meta property="article:author" content="http://www.zujava.com/users/varietywriter" />
Meta Tag: <meta property="article:tag" content="crafts" />
Meta Tag: <meta property="article:tag" content="education" />
Meta Tag: <meta property="article:tag" content="school" />
Meta Tag: <meta property="article:tag" content="back to school" />
Meta Tag: <meta property="article:tag" content="easy crafts" />
Meta Tag: <meta property="article:tag" content="art" />
Meta Tag: <meta property="article:tag" content="arts and craft projects" />
Meta Tag: <meta property="article:tag" content="books" />
Meta Tag: <meta property="article:tag" content="book covers" />
Meta Tag: <meta property="article:tag" content="how to" />
Meta Tag: <meta property="article:tag" content="make your own" />
Meta Tag: <meta property="article:tag" content="arts and crafts" />
是否有格式错误或丢失的内容?
不用担心,这只是一个警告(不是错误,错误在调试工具输出中以红色显示),并且不会阻止 OpenGraph 中的数据更新。
为了确保您可以将更新的数据与您发布的数据进行比较,目前似乎没问题。
article:published_time:1341644400 -> 2012-07-07T10:00:00+03:00
如果您不想抑制警告消息,只需将 OpenGraph 元标记中的
DateTime
字段内容替换为 UNIX 时间戳,警告就会消失。我在OpenGraph:自定义属性未在帖子中显示的答案中描述了这一点,提供了有关该问题的现有错误的链接(请参阅答案底部的顺便说一句)。