Facebook网页分享标记

meta标签规范

参考:https://developers.facebook.com/docs/sharing/webmasters
分享调试:https://developers.facebook.com/tools/debug/

标记示例:如使用 og:type="article" 和多个附加属性标记文章、动态消息或博文

<meta property="og:url"            content="http://www.nytimes.com/2015/02/19/arts/international/when-great-minds-dont-think-alike.html" />
<meta property="og:type"           content="article" />
<meta property="og:title"          content="When Great Minds Don’t Think Alike" />
<meta property="og:description"    content="How much does culture influence creative thinking?" />
<meta property="og:image"          content="http://static01.nyt.com/images/2015/02/19/arts/international/19iht-btnumbers19A/19iht-btnumbers19A-facebookJumbo-v2.jpg" />

Vue.js中动态设置meta标签

参考:https://github.com/declandewet/vue-meta

$ npm install vue-meta --save
import Vue from 'vue'
import Meta from 'vue-meta'

Vue.use(Meta)
export default {
  name: 'bargain',
  data () {
      metaInfo: {
        meta: [
          { property: 'og:url', content: '' },
          { property: 'og:type', content: 'article' },
          { property: 'og:title', content: '' },
          { property: 'og:description', content: '' },
          { property: 'og:image', content: '' },
          { property: 'fb:app_id', content: '' }
        ]
      }
    }
  }
}

版权声明:
作者:Joe.Ye
链接:https://www.appblog.cn/index.php/2023/03/18/facebook-page-sharing-tags/
来源:APP全栈技术分享
文章版权归作者所有,未经允许请勿转载。

THE END
分享
二维码
打赏
海报
Facebook网页分享标记
meta标签规范 参考:https://developers.facebook.com/docs/sharing/webmasters 分享调试:https://developers.facebook.com/tools/debug/ 标记示例:如使用 o……
<<上一篇
下一篇>>
文章目录
关闭
目 录