facebook和twitter分享链接时,附带预览图

 

 

 

 图片设置200*200px,

html的head标签设置如下结构,注意内容改成自己分享的链接相关的信息

<meta name="twitter:card" content="summary" />
    <meta name="twitter:title" content="「Raziel (ラジエル)」公式サイト" />
    <meta name="twitter:site" content="「Raziel (ラジエル)」公式サイト"/>
    <meta name="twitter:description" content="「Raziel (ラジエル)」公式サイト"/>
    <meta name="twitter:account_id" content="@Raziel_game"/>
    <meta name="twitter:image" content="http://jp.raziel.indragame.com/resource/images/fbshare.jpg">
    <meta property="og:title" content="「Raziel (ラジエル)」公式サイト" />
    <meta property="og:type" content="website" />
    <meta property="fb:app_id"          content="195212105039318" />
    <meta property="og:site_name" content="「Raziel (ラジエル)" />
    <meta property="og:url" content="http://jp.raziel.indragame.com"/>
    <meta name="msapplication-TileImage" content="http://jp.raziel.indragame.com/resource/images/fbshare.jpg">
    <meta property="og:image"         content="http://jp.raziel.indragame.com/resource/images/fbshare.jpg" />
    <meta
      property="og:description"
      content="スマホ向けのダークファンタジー新作『ラジエル』日本で初登場!未知の冒険に挑戦し、アツいバトルを堪能しましょう!"
    />
  <meta property="url" content="http://jp.raziel.indragame.com">
    <meta property="type" content="website">
    <meta property="title" content="「Raziel (ラジエル)">
    <meta property="description" content="「Raziel (ラジエル)">
    <meta property="image" content="http://jp.raziel.indragame.com/resource/images/fbshare.jpg">
    <meta itemprop="image" content="http://jp.raziel.indragame.com/resource/images/fbshare.jpg">
下面这个是facebook测试分享调试工具

猜你喜欢

转载自www.cnblogs.com/gduf/p/12825764.html