我一直试图设置几篇文章的og属性,但我遇到了一个问题,而我似乎无法弄清楚如何修复它。我使用Yoast SEO设置我的属性,但是当我试图在Facebook上分享帖子时,提供的数据不正确。
这是我得到的错误:
以下属性在网页上指定,但不支持指定的' og:type':文章: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
答案 0 :(得分:1)
您的og:type
被指定为website
和article
两次。因此,您需要仔细检查多个插件或主题是否已添加此内容。
作为一种解决方案,最直接的方法是禁用添加错误og:type
的方法。
如果这不是一个选项,您可以随时编写一个过滤错误值的操作(https://codex.wordpress.org/Plugin_API/Action_Reference/wp_head)。
如果您遇到更多麻烦,您可以随时使用Facebook的调试工具调试页面的og-tags; https://developers.facebook.com/tools/debug/