微信分享朋友圈,大家遇到过这个问题没。求解答 [ 未指定版本 ]

                拷贝忍者卡卡西 补充于 2018-07-06 10:44
                
                                    
            
            wx.config({
    debug: true,
    appId: '<?php echo $signPackage["appId"];?>',
    timestamp: <?php echo $signPackage["timestamp"];?>,
    nonceStr: '<?php echo $signPackage["nonceStr"];?>',
    signature: '<?php echo $signPackage["signature"];?>',
    jsApiList: [
      'onMenuShareTimeline','onMenuShareQQ'
      // 所有要调用的 API 都要加到这个列表中
    ]
  });
  wx.checkJsApi({
    jsApiList: ['onMenuShareTimeline','onMenuShareQQ'], // 需要检测的JS接口列表,所有JS接口列表见附录2,
    success: function(res) {
		alert(res);
    // 以键值对的形式返回,可用的api值true,不可用为false
    // 如:{"checkResult":{"chooseImage":true},"errMsg":"checkJsApi:ok"}
    }
});
  wx.ready(function () {
    var url = location.href.split('#')[0];
    // 在这里调用 API
    wx.onMenuShareQQ({
      title: '互联网之子 方倍工作室',
      link: url,
      desc: '分享描述', // 分享描述
      imgUrl: 'http://img3.douban.com/view/movie_poster_cover/spst/public/p2166127561.jpg',
      trigger: function (res) {
		alert(res);
		alert('用户点击分享到朋友圈');
      },
      success: function (res) {
		  alert(res);
        alert('已分享');
      },
      cancel: function (res) {
		  alert(res);
        alert('已取消');
      },
      fail: function (res) {
		  alert(res);
        alert(JSON.stringify(res));
      }
    });
	wx.onMenuShareTimeline({
      title: '互联网之子 方倍工作室',
      link: url,
      imgUrl: 'http://img3.douban.com/view/movie_poster_cover/spst/public/p2166127561.jpg',
      trigger: function (res) {
		alert(res);
		alert('用户点击分享到朋友圈');
      },
      success: function (res) {
		  alert(res);
        alert('已分享');
      },
      cancel: function (res) {
		  alert(res);
        alert('已取消');
      },
      fail: function (res) {
		  alert(res);
        alert(JSON.stringify(res));
      }
    });
    alert('已注册获取“分享到朋友圈”状态事件');
	// 2.2 监听“分享到朋友圈”按钮点击、自定义分享内容及分享结果接口
  });
  wx.error(function(res){
	  alert("错误信息:"+res);
    // config信息验证失败会执行error函数,如签名过期导致验证失败,具体错误信息可以打开config的debug模式查看,也可以在返回的res参数中查看,对于SPA可以在这里更新签名。
});
上传图片就是未响应。凑合着看吧。
最佳答案
其他 6 个回答
- 
 - 
 - 

这个图没看出有什么问题,其实也就那几步,下载并调用JSSDK,按照微信公众平台开发者文档对接,JS接口安全域名绑定,ip白名单设置,用微信web开发者工具调试,如果有错误自然会提示

需要使用的JS接口列表添加需要分享的模块,未注册的接口将会使用微信默认的分享模式,
对接文档地址https://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1421141115 - 
 - 
nswindlights 回答于 2018-07-06 13:02 举报是微信关闭了分享返回结果,无法获知用户是否分享完成。链接是微信公告
https://mp.weixin.qq.com/cgi-bin/announce?action=getannouncement&announce_id=11526372695t90Dn&version=&lang=zh_CN共 1 条回复
        HelloNullWorld 回复于 2018-07-09 13:38 回复对的,我记得我也看到了这个公告了。为了防止营销,所以后面将会取消成功的反馈。以后没办法得知了
 - 
 
拷贝忍者卡卡西
            注册时间:2016-11-01
最后登录:2024-03-19
在线时长:30小时46分
    最后登录:2024-03-19
在线时长:30小时46分
- 粉丝19
 - 金钱1365
 - 威望0
 - 积分1665