我正在尝试在whatsapp上显示链接预览,它适用于ios和Windows,但不适用于android。我已经尝试了所有应该位于标记中的元标记。我错过了什么吗?
答案 0 :(得分:3)
我也有同样的问题。但是,我想出了解决方法。
在链接中使用“ http://”或“ https://”。缩略图会自动显示在Android Whatsapp中。
以下链接不会显示缩略图
www.example.com
正确用法
<https://www.example.com>
网站缩略图会自动显示在Android Whatsapp手机中。
答案 1 :(得分:1)
WhatsApp链接预览对我也不起作用。在尝试了一些选择之后,我终于使它工作了。这是最适合我的8个html标签:
在 <head>
标签中:
<meta property="og:title" content="ABC Blabla 2020 Friday" />
<meta property="og:url" content="https://bla123.neocities.org/mp/friday.html" />
<meta property="og:description" content="Photo Album">
<meta property="og:image" itemprop="image" content="https://bla123.neocities.org/mp/images/thumbs/IMG_327.JPG"/>
<meta property="og:type" content="article" />
<meta property="og:locale" content="en_GB" />
在 <body>
标签中:
<link itemprop="thumbnailUrl" href="https://bla123.neocities.org/mp/images/thumbs/IMG_327.JPG">
<span itemprop="thumbnail" itemscope itemtype="http://schema.org/ImageObject">
<link itemprop="url" href="https://bla123.neocities.org/mp/images/thumbs/IMG_327.JPG">
</span>
这8个标签(头部6个,身体2个)效果很好。
提示:
1。使用确切的图片位置网址代替目录格式,即,不要使用images / OG_thumb.jpg
2。区分大小写的文件扩展名:如果您的托管服务提供商上的图像扩展名是“ .JPG”,则不要使用“ .jpg”或“ .jpeg”。我观察到基于托管服务提供商和浏览器组合的错误可能或可能不会发生,因此,为了安全起见,更容易匹配文件扩展名的大小写。
3。完成上述步骤后,如果缩略图预览仍未显示在WhatsApp消息中,则:
a。强制停止移动应用(我曾在Android中尝试过),然后重试
b。使用在线工具预览OG标签,例如,我曾经使用过https://searchenginereports.net/open-graph-checker
c。在移动浏览器中,将直接链接粘贴到OG拇指,并刷新浏览器4-5次。例如https://bla123neocities.org/nmp/images/thumbs/IMG_327.JPG
答案 2 :(得分:0)
好的,您应该使用meta标签,有时需要一段时间才能进行更改,因此您需要等待。
标题
<meta property="og:title" content="title in here" />
说明
<meta property="og:description" content="description in here">
图片
<meta property="og:image" content="image in here">
URL
<meta property="og:url" content="url in here" />
PS:在whatsapp上有效,仅当您复制将URL粘贴到聊天中时