【问题标题】:share link of website on whatsapp with image tag also在whatsapp上分享网站链接和图片标签
【发布时间】:2018-12-10 09:20:05
【问题描述】:

当我们分享这样的链接时,我们如何在我们的网站中包含一张图片以显示在 WhatsApp 中?

代码

    <html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <script type="text/javascript" src="####"></script>  // plugin from 

www.addthis.com

</head>
<body>
    <form id="form1" runat="server">
    <div class="addthis_inline_share_toolbox"></div>
    </form>
</body>
</html>

【问题讨论】:

    标签: html asp.net plugins whatsapp


    【解决方案1】:

    要为大多数社交分享网站添加图片,您需要在网站的 head 标签中添加一些元数据

    您正在寻找的具体元标记是“og:image”。这是一个例子。

    <meta property="og:image" content="https://via.placeholder.com/150" />
    

    内容字段将指向您想要的图像的位置。当您在许多社交媒体(WhatsApp、Facebook、LinkedIn...)上分享您的网站时,将使用此标签

    请注意,对于 Twitter,标签是“twitter:image:src”

    有关更多信息,您可以查看此https://ogp.me/

    【讨论】:

      猜你喜欢
      • 2016-12-26
      • 2019-05-08
      • 2018-10-10
      • 1970-01-01
      • 2018-09-06
      • 2013-11-15
      • 1970-01-01
      • 2018-04-30
      • 2015-11-04
      相关资源
      最近更新 更多