最近在使用微信JSSDK
出现一个奇怪的现象,调用微信JSSDK分享朋友圈的方法,结果在IOS
系统中只有标题无法显示图片,但调用分享朋友,QQ
,微博的方法却是可以正常的显示,觉得甚至奇怪,不知道有谁可以帮忙解决下呢?
代码主体:
javascript
var shareData = { title: '潮童xxx真是拼了,你也要来拼吗?', desc: '潮童xxx真是拼了,你也要来拼吗?', link: 'https://open.weixin.qq.com/connect/oauth2/authorize?appid=xxx&redirect_uri=xxx&response_type=code&scope=snsapi_base&state=xxx#wechat_redirect', imgUrl: 'http://j2ee.u.qiniudn.com/soulong.jpg-alias' } wx.config({ debug: false, appId: 'xxx', timestamp: xxx, nonceStr: 'xxx', signature:'xxx', jsApiList:[ 'checkJsApi', 'onMenuShareTimeline', 'onMenuShareAppMessage', 'onMenuShareQQ', 'onMenuShareWeibo', 'hideMenuItems', 'showMenuItems', 'hideAllNonBaseMenuItem', 'showAllNonBaseMenuItem', 'chooseImage', 'previewImage', 'uploadImage', 'getNetworkType', 'hideOptionMenu', 'showOptionMenu'] }); wx.ready(function () { wx.checkJsApi({ jsApiList: ['getNetworkType'], success: function (res) { $('#loadMask').hide(); } }); wx.getNetworkType({ success: function (res) { var nt = res.networkType; if (nt!='wifi'){ alert('亲,您当前用的不是WIFI环境,加载较缓慢请稍后.'); } } }); // 注册分享朋友圈事件 wx.onMenuShareTimeline({ title: shareData.title, link: shareData.link, imgUrl: shareData.imgUrl, success: function () { xxx }, cancel: function () { xxx } }); // 注册分享朋友事件 wx.onMenuShareAppMessage({ title: shareData.title, desc: shareData.desc, link: shareData.link, imgUrl: shareData.imgUrl, success: function () { xxx }, cancel: function () { xxx } }); });
有肾机的朋友可以扫描下面的二维码尝试下(可能需要先关注下微信,并不是推广)
来自微信官方的解释:
http://mp.weixin.qq.com/wiki/7/aaa137b55fb2e0456bf8dd9148dd613f.html