我收到来自 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/