getShareInfo: fail 3200
想拿到群信息,按照文档的2种方法是调用getShareInfo,参数是shareTicket;
1: 从1044场景进入:
代码:
onLaunch: function (e) { console.log( "================onLaunch================\n" ,e) shareTicket = e.shareTicket; wx.getShareInfo({ "shareTicket" : shareTicket,complete: function (res){ console.log( "================getShareInfo complete================\n" ,res) |
结果:
2: 点击分享后回调:
代码:
onShareAppMessage: function () { return { title: '分享!' , path: '/pages/duel/duel?share_id=' + userId, success: function (res) { console.log( "================share success================\n" , res) ; // wx.getShareInfo(); var shareTickets = res.shareTickets; wx.getShareInfo({ shareTicket: shareTickets[0], complete: function (res) { console.log( "================getShareInfo callback================\n" ,res); } }); }, fail: function (res) { console.log( "share fail" ) } } |
结果: