Home  >  Q&A  >  body text

javascript - WeChat sharing interface modification of sharing links and pictures does not work on Apple ios

Call the sharing interface in WeChat js-sdk to modify the page sharing content and pictures. It has been tested that the pictures and titles shared by Android are successfully modified, but there are no changes when shared by Apple phones. I don’t know whether there is a problem with Apple compatibility or not. what reason

迷茫迷茫2707 days ago1564

reply all(4)I'll reply

  • 某草草

    某草草2017-06-13 09:24:09

    In iOS WeChat version 6.1, the external links of shared pictures are not displayed. Only pictures linked within the official account page or pictures from the WeChat server can be displayed (WeChat team has confirmed this problem and will fix it in 6.2)

    reply
    0
  • 阿神

    阿神2017-06-13 09:24:09

    Now this problem generally does not occur. After all, the current iOS version is generally above 8.2. I also often create WeChat h5 pages and share iOS without any problems. I personally think there is a problem with the code, or you can post some code and take a look

    reply
    0
  • 过去多啦不再A梦

    过去多啦不再A梦2017-06-13 09:24:09

    The js files introduced on ios must support https

    reply
    0
  • typecho

    typecho2017-06-13 09:24:09

    Damn, I accidentally discovered that after adding http to the link in the code, ios becomes normal. What the hell, ios doesn’t have http and he can’t recognize it! Modified pictures and links must be preceded by http! !

    wx.config({
        debug: false,
        appId: '<?php echo $signPackage["appId"];?>',
        timestamp: '<?php echo $signPackage["timestamp"]?>',
        nonceStr: '<?php echo $signPackage["nonceStr"];?>',
        signature: '<?php echo $signPackage["signature"];?>',
          jsApiList: [
            'onMenuShareTimeline','onMenuShareAppMessage'
          ]
    });
    wx.ready(function(){
        wx.onMenuShareTimeline({
            title: "<{$product_info.info.title}>", // 分享标题
            link: "http://www.xxxx.com<{:U('Home/Product/Index/product_details',array('product_id'=>$product_info['info']['id']))}>", // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
            imgUrl: 'http://www.xxxx.com<{$product_info.info.cover|thumb=300,300,M}>', // 分享图标
            success: function () { 
                // 用户确认分享后执行的回调函数
            },
            cancel: function () { 
                // 用户取消分享后执行的回调函数
            }
        });
    });

    reply
    0
  • Cancelreply