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: '' }
        ]
      }
    }
  }
}
上一篇 微信官方轻量级键值对存储框架MMKV
下一篇 Android接入Facebook登录踩坑记录
目录
文章列表
1 MathJax基础之Array或Table
MathJax基础之Array或Table
2
Nginx配置限制IP访问
Nginx配置限制IP访问
3
Vue监听select标签change事件
Vue监听select标签change事件
4
iOS微信支付接入(Swift)
iOS微信支付接入(Swift)
5
Spring Boot中的页面跳转
Spring Boot中的页面跳转
最新评论
一位WordPress评论者
一位WordPress评论者
2月12日
您好,这是一条评论。若需要审核、编辑或删除评论,请访问仪表盘的评论界面。评论者头像来自 Gravatar。