无需公众号实现微信JSSDK分享卡片!Safari浏览器分享到微信自动成卡片!

竹清松瘦 目录 工作笔记
0

要在微信分享卡片,需要接入微信自家的JSSDK,比较麻烦,还需要认证公众号,但是如果你没有这样的条件,那么你也可以试试使用iOS的Safari浏览器轻松实现,只需要在html中加入3个meta即可。

<!DOCTYPE html>
<html dir="ltr" data-react-helmet="dir">
    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no, viewport-fit=cover, minimum-scale=1, maximum-scale=1, user-scalable=no">
        <meta http-equiv="x-ua-compatible" content="ie=edge">
        <meta name="renderer" content="webkit">
        <meta name="layoutmode" content="standard">
        <meta name="imagemode" content="force">
        <meta name="wap-font-scale" content="no">
        <meta name="format-detection" content="telephone=no">
        <title>测试</title>
    
        <meta name="description" content="11111111111111111">
        <meta property="og:type" content="website">
<meta property="og:title" content="测试">
<meta property="og:description" content="测试测试 测试测试测试测试测试测试">
<meta property="og:image" content="http://hui-yi.com.cn/huiyi/images/to_top.png">
    </head>
     
    <body>
        请在Safari浏览器点击分享到微信!
    </body>
 
</html>

 

是哪三个meta?

 

<meta property="og:title" content="测试">
<meta property="og:description" content="测试测试 测试测试测试测试测试测试">
<meta property="og:image" content="http://hui-yi.com.cn/huiyi/images/to_top.png">

分别是标题、摘要、图片。配置了这三个,直接在Safari浏览器分享出去,就是卡片了。




作者
TANKING
« 上一篇: :下一篇 »

发表评论