【问题标题】:Facebook not detecting og:title, og:description, or og:imageFacebook 未检测到 og:title、og:description 或 og:image
【发布时间】: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


    【解决方案1】:

    源中的 og:url 与您提供的 url 不匹配:https://staymacro.com//editorial/caleb

    这是获取标签的相关 URL,它不起作用(没有 SSL,找不到页面)。

    您甚至可以在调试器中看到:“Curl-Fehler: 51 (SSL_PEER_CERTIFICATE)”。查看“规范 URL”。

    【讨论】:

    • 谢谢!!我还注意到相关的 og: 数据没有在 Safari 中更新。这可能是类似的原因吗?
    • 嗯...有一个ssl错误,并且找不到http页面,所以是的,肯定
    猜你喜欢
    • 2012-06-12
    • 1970-01-01
    • 2019-12-24
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-07-19
    相关资源
    最近更新 更多