【问题标题】:Open graph properties are specified but not supported已指定但不支持打开图形属性
【发布时间】:2018-06-30 22:07:26
【问题描述】:

我一直在尝试设置几篇文章的 og 属性,但遇到了一个问题,我似乎不知道如何解决它。我使用 Yoast SEO 设置了我的属性,但是当我尝试在 Facebook 上分享帖子时,提供的数据不正确。

这是我得到的错误:

网页上指定了以下属性,但不支持指定的“og:type”:article:publisher、article:author、article:section、article:published_time、article:modified_time、fb:appid

 <meta name="google-site-verification" 
content="6bN5lpZ988fwDMWpXPO_2hWdYcXBlwyhJPOqNsbzwNo" />
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta name="description" content="Over the years, Romanian wine has 
attracted countless European business people and wine enthusiasts, mainly 
due to the affordable prices compared to countries such as Italy, France, or 
Germany. Discover the best wine regions and grape varieties in Romania." />
    <meta property="og:locale" content="en_US" />
    <meta property="og:type" content="article" />
    <meta property="og:title" content="Discover the wines of Romania" />
    <meta property="og:description" content="Explore Romania's best wine regions 
    and discover the grape varieties of Romania." />
    <meta property="og:url" content="https://rolandia.eu/romanian-wine/" />
    <meta property="og:site_name" content="Rolandia" />
    <meta property="article:publisher" 
    content="https://www.facebook.com/Rolandia.travel/" />
    <meta property="article:author" 
    content="https://www.facebook.com/cretu.bogdan.13" />
    <meta property="article:section" content="Discover Romania" />
    <meta property="article:published_time" content="2018-01-08T13:57:26+00:00" />
    <meta property="article:modified_time" content="2018-01-22T08:18:35+00:00" />
    <meta property="og:updated_time" content="2018-01-22T08:18:35+00:00" />
    <meta property="fb:app_id" content="457855247901149" />
    <meta property="og:image" content="http://rolandia.eu/wp-    content/uploads/2018/01/open-graph-test.jpg" />
    <meta name="twitter:card" content="summary" />
    <meta name="twitter:description" content="Over the years, Romanian wine has attracted countless European business people and wine enthusiasts, mainly due to the affordable prices compared to countries such as Italy, France, or Germany." />
    <meta name="twitter:title" content="Discover the wines of Romania" />
    <meta name="twitter:image" content="http://rolandia.eu/wp-content/uploads/2018/01/twitter-cards-test.jpg" />
    <meta name="generator" content="WordPress 4.9.2" />
    <meta name="generator" content="WooCommerce 3.2.6" />
    <meta name="generator" content="WPML ver:3.9.1 stt:1,4,3;" />
    <meta property="fb:appid" content="1394793937256662" />
    <meta property="og:type" content="website" />
    <meta property="og:title" content="Romanian wine" />
    <meta property="og:url" content="https://rolandia.eu/romanian-wine/" />
    <meta property="og:description" content="Over the years, Romanian wine has attracted countless European business people and wine enthusiasts, mainly due to ..." />
    <meta property="og:image" content="https://rolandia.eu/wp-content/uploads/2018/01/romanian-wine-300x200.jpg" />
    <meta property="og:image:width" content="384" />
    <meta property="og:image:height" content="250" />
    <meta property="og:site_name" content="Rolandia" />
    <meta property="og:locale" content="en_US" />
    <meta name="generator" content="Powered by Visual Composer - drag and drop page builder for WordPress." />
    <meta name="generator" content="Powered by Slider Revolution 5.4.5.1 - responsive, Mobile-Friendly Slider Plugin for WordPress with comfortable drag and drop interface." />
    <meta name="msapplication-TileImage" content="https://rolandia.eu/wp-content/uploads/2015/01/cropped-Rolandia-favicon-270x270.png" />
URLs

【问题讨论】:

  • 正是我想要的,谢谢

标签: html wordpress facebook facebook-opengraph


【解决方案1】:

您的og:type 似乎被指定为websitearticle 两次。所以你需要仔细检查多个插件或你的主题是否已经添加了这个。

作为一种解决方案,最直接的方法是禁用添加错误og:type 的方法。 如果这不是一个选项,您可以随时编写一个操作来过滤我们的错误值 (https://codex.wordpress.org/Plugin_API/Action_Reference/wp_head)。

如果您遇到更多麻烦,您可以随时使用 Facebook 的调试器工具调试页面的 og-tags; https://developers.facebook.com/tools/debug/

【讨论】:

  • 我使用调试器调试您的元标记中提到的页面,实际上 Facebook 将页面视为 og:type website 使错误有效,因为这些属性适用于被忽略的 og:type article
猜你喜欢
  • 2016-11-28
  • 2013-01-10
  • 2020-09-29
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多