'og:type'属性是必需的,但不存在

时间:2014-10-14 07:18:04

标签: facebook wordpress

我知道这个问题已在Stackoverflow上多次发布和回答,但即使经过这里的相当多的答案,我还没有设法解决我的问题大约一个星期。最后我决定在这里发一个问题。

我的网站网址:http://tech.firstpost.com/news-analysis/new-ipad-air-2-likely-to-be-thinner-faster-and-feature-touch-id-sensor-237405.html

如果您在源代码中看到,则会显示所有建议的og标记。



<meta property="og:locale" content="en_US" />
<meta property="og:type" content="article" />
<meta property="og:title" content="New iPad Air 2 likely to be thinner, faster and feature Touch ID sensor - Tech2" />
<meta property="og:description" content="Apple is expected to unveil the next generation of iPads this week, but looks like tipsters are determined to reveal much of what&#039;s in store even before th - Tech2" />
<meta property="og:url" content="http://tech.firstpost.com/news-analysis/new-ipad-air-2-likely-to-be-thinner-faster-and-feature-touch-id-sensor-237405.html" />
<meta property="og:site_name" content="Tech2" />
<meta property="article:publisher" content="https://www.facebook.com/tech2dotcom" />
<meta property="article:published_time" content="2014-10-14T10:35:02+05:30" />
<meta property="article:modified_time" content="2014-10-14T10:39:42+05:30" />
<meta property="og:updated_time" content="2014-10-14T10:39:42+05:30" />
<meta property="og:image" content="http://stech3.firstpost.com/wp-content/uploads/2014/06/apple_ipad_air_5_281150302632_640x360.jpg" />
&#13;
&#13;
&#13;

但是,当我检查FB共享调试器时,它说

1)&#39; og:type&#39;财产是必需的,但不存在。 2)&#39; og:url&#39;应明确提供属性,即使可以从其他标记推断出值。

但是当我从调试器中重新调试时,它会正确地获取所有内容。

此网站在wordpress上运行。我为其他3个使用类似Facebook分享功能和相应标签的网站工作。他们似乎都没有任何问题。在这个网站上,它一直工作到几天前。但突然之间,在随机文章中,它不起作用。

我已经阅读了一些答案,我需要添加 fb:app_id ,但我认为这不是强制性的。我的其他网站都没有使用它,但一切似乎都运行正常。

任何帮助都将非常感激。这个完全无聊,我无法绕过它。

提前谢谢

编辑: -

&#13;
&#13;
<meta property="og:locale" content="en_US" />
<meta property="og:type" content="article" />
<meta property="og:title" content="New iPad Air 2 likely to be thinner, faster and feature Touch ID sensor - Tech2" />
<meta property="og:description" content="Apple is expected to unveil the next generation of iPads this week, but looks like tipsters are determined to reveal much of what&#039;s in store even before th - Tech2" />
<meta property="og:url" content="http://tech.firstpost.com/news-analysis/new-ipad-air-2-likely-to-be-thinner-faster-and-feature-touch-id-sensor-237405.html" />
<meta property="og:site_name" content="Tech2" />
<meta property="article:publisher" content="https://www.facebook.com/tech2dotcom" />
<meta property="article:tag" content="Apple" />
<meta property="article:tag" content="iPad" />
<meta property="article:tag" content="iPad Air 2" />
<meta property="article:tag" content="ipad air 2 features" />
<meta property="article:tag" content="ipad air 2 leaks" />
<meta property="article:tag" content="ipad air 2 release" />
<meta property="article:tag" content="ipad launch october" />
<meta property="article:section" content="News &amp; Analysis" />
<meta property="article:published_time" content="2014-10-14T10:35:02+05:30" />
<meta property="article:modified_time" content="2014-10-14T10:39:42+05:30" />
<meta property="og:updated_time" content="2014-10-14T10:39:42+05:30" />
<meta property="og:image" content="http://stech3.firstpost.com/wp-content/uploads/2014/06/apple_ipad_air_5_281150302632_640x360.jpg" />
<meta name="twitter:card" content="summary"/>
<meta name="twitter:site" content="@tech2eets"/>
<meta name="twitter:domain" content="Tech2"/>
<meta name="twitter:creator" content="@tech2eets"/>
&#13;
&#13;
&#13;

这些我使用的所有标签

1 个答案:

答案 0 :(得分:0)

我猜og:类型将是网站<meta property="og:type" content="website" />,或者您可以查看og:来自http://ogp.me/#no_vertical

的类型

没有垂直

这些是全球定义的对象,它们不适合垂直但却被广泛使用和商定。

og:输入值:

  • article - 命名空间URI:http://ogp.me/ns/article#
  • article:published_time - datetime - 文章首次发布时。
  • article:modified_time - datetime - 上次更改文章时。
  • article:expiration_time - datetime - 文章过期后。
  • article:author - profile array - 文章的作者。
  • article:section - string - 高级部分名称。例如。技术
  • article:tag - string array - 标记与本文相关的单词。