H5页面分享到群,提示操作过于频繁
操作方式:
微信内直接打开H5页面:http://man.39.net/slbp/share.html
右上角->分享给朋友,然后选择群。
则出现以下提示:操作过于频繁,可稍候再试。
页面代码如下:
var api39_wx = function(config) { if (navigator.userAgent.match(/MicroMessenger/i)) { $.ajax({ tyep: "get", url: "http://xxxxxxxxxx/GetConfigParameter", dataType: "jsonp", jsonp: "jsoncallback", data: { urlback: encodeURIComponent(location.href.split("#")[0]) }, success: function(data) { wx.config({ debug: false, appId: data.strappid, timestamp: data.strtimestamp, nonceStr: data.strnoncestr, signature: data.strsignature, jsApiList: ["onMenuShareTimeline", "onMenuShareAppMessage", "onMenuShareQQ", "onMenuShareQZone"] }); wx.ready(function() { if(wx.onMenuShareAppMessage) { wx.onMenuShareAppMessage(config); wx.onMenuShareQQ(config); } else { wx.updateTimelineShareData(config,function(res){ }); } if(wx.onMenuShareTimeline) { wx.onMenuShareTimeline(config); wx.onMenuShareQZone(config); } else { wx.updateAppMessageShareData(config,function(res){ }); } }); } }) } }; var wxinfo = new api39_wx({ title: '自定义分享标题出来了', desc: '这里是自定义分享的摘要', link: location.href, imgUrl: 'http://nimage.39.net/wap/m/images/pic/for_weixin.jpg', }); |
如果去掉这段代码,则可以分享到群,但分享标题、链接、缩略图均为微信自动获取。
