【发布时间】:2019-04-04 22:48:41
【问题描述】:
我使用 Nuxt.js 构建了一个 Vue 应用程序,但由于某种原因,og: 标签在 facebook 上不起作用。我在源代码中看到它们,并通过 FB 调试器运行该站点,但它说我不需要 og: 元标记。
网站在这里: https://staymacro-staging.netlify.com/editorial/caleb/
页面中的代码:
head () {
return {
title: `${this.title}`,
meta: [{
hid: `description`,
name: 'description',
content: `${this.description}`
},
{
hid: `og-title`,
property: 'og:title',
content: `${this.title}`
},
{
hid: `og-description`,
property: 'og:description',
content: `${this.description}`
},
{
hid: `og-image`,
property: 'og:image',
content: `${this.image}`
},
{
hid: `og-url`,
property: 'og:url',
content: `https://staymacro.com/${this.$route.path}`
}]
}
},
分享在 Slack、iMessage、Twitter 等上有效,但在 Facebook 上无效
【问题讨论】:
标签: facebook vue.js facebook-opengraph nuxt.js