微信转发fail, the permission value is offline verifyin
微信转发问题
这样的写法提示updateAppMessageShareData:fail, the permission value is offline verifying,如何解决,急!
config正确通过
config的jsApiList参数包含了这个JSAPI:updateAppMessageShareData
<script src=“http://res2.wx.qq.com/open/js/jweixin-1.6.0.js”></script>
<script type=“text/javascript”>
$(function() {
$.ajax({
"url":"XXX", //接口地址
"type":"Get",
"dataType":"json",
"success":function(data){
// console.log(data);
wx.config({
debug: false,
appId: data.appId,
timestamp: data.timestamp,
nonceStr: data.nonceStr,
signature: data.signature,
jsApiList: \["updateAppMessageShareData", "updateTimelineShareData"\]
});
wx.ready(function () {
wx.updateAppMessageShareData({
title: '分享标题 | 分享给朋友', // 分享标题
desc: '分享描述 | 分享给朋友', // 分享描述
success: function () {
// 设置成功
console.log('分享成功');
}
})
});
wx.error(function(res){
console.log("configError:"+JSON.stringify(res));
});
}
});
});
</script>