我一直在尝试将 facebook article:author
元标记添加到 wordpress,不幸的是我不知道如何为多个作者添加它。这是我到目前为止所做的,但作者的名字仍然没有出现在 Facebook 分享中。
<meta property="article:author" content= "<?php $author = get_the_author(); ?>" />
最佳答案
根据 https://developers.facebook.com/docs/reference/opengraph/object-type/article#properties article:author
包含
An array of Facebook profile URLs or IDs of the authors for this article.
截至https://developers.facebook.com/docs/opengraph/creating-custom-stories/#propertytypes-simple
You define an array value by repeating the same meta tag name for each element of the array.
示例
<meta property="cookbook:ingredients" content="Chocolate">
<meta property="cookbook:ingredients" content="Sugar">
<meta property="cookbook:ingredients" content="Butter">
确保你定义
<meta property="og:type" content="article" />
还有。
关于php - Wordpress 中多个作者的 Facebook Open-graph 标签,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24381893/