seo - 如何修复来自 Facebook Open Graph 调试工具的 "Parser Mismatched Metadata"错误?

标签 seo html facebook

我收到来自 Facebook Object Debugger 的错误对于我最近将 Open Graph 标签添加到的网页:

The parser's result for this metadata did not match the input metadata. Likely, this was caused by the data being ordered in an unexpected way, multiple values being given for a property only expecting a single value, or property values for a given property being mismatched. Here are the input property =>content pairs that were not seen in the parsed result: 'article:published_time => 2012-05-15'

以下是该工具报告的元标记:

Meta Tag:   <meta property="og:site_name" content="Mysite.com" />
Meta Tag:   <meta property="og:url" content="ful url" />
Meta Tag:   <meta property="fb:app_id" content="a number" />
Meta Tag:   <meta property="article:published_time" content="2012-05-15" />
Meta Tag:   <meta property="article:author" content="url to user profile page" />
Meta Tag:   <meta property="og:image" content="url to png" />
Meta Tag:   <meta property="og:type" content="article" />
Meta Tag:   <meta property="og:title" content="Well Versed" />

起初我以为这是 published_time 的日期表单问题,但该字段似乎遵循 time format Facebook uses in their example .我不确定是什么产生了这个错误。顺序重要吗?

更新:我将下面的答案标记为已接受,因为显然人们通过他的修复解决了这个问题。但是,这不是对我有用的解决方案。这Stack Overflow open graph answer成功了。

最佳答案

我的解决方案听起来很奇怪,但我使用 trim 解决了这个问题,问题出在标题中,我的标题类似于“我的标题”。 修剪字符串后一切正​​常。在我看来,Facebook 解析器不喜欢空格...至少尝试一下,看看是否为您修复了错误。

希望对您有所帮助!

关于seo - 如何修复来自 Facebook Open Graph 调试工具的 "Parser Mismatched Metadata"错误?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10656337/

相关文章:

php - 60 天后延长 Facebook 访问 token

android - 打开新帖子作为意向 - Facebook 移动版

facebook - 从 Facebook Messenger Chatbot api 获取用户当前位置

php - 在php和MySql中搜索引擎友好的POST

performance - 抓取站点并为每个 URL 编译有效负载统计信息的工具?

html - 表格单元格属性忽略宽度

html - 为什么父 div 不会和它的 child 一起成长

php - 如何在 WordPress 中获取帖子标题?

angular - 部署后从 URL 中删除 # 不起作用 - HTTP 404

html - 多个元素向左浮动,一个元素向右浮动的 CSS 问题