微信转发fail, the permission value is offline verifyin
发布于 6 年前 作者 tao42 12014 次浏览 来自 官方Issues

微信转发问题

这样的写法提示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() {

		&nbsp; &nbsp; $.ajax({

		&nbsp; &nbsp; &nbsp; &nbsp; "url":"XXX",&nbsp; //接口地址

		&nbsp; &nbsp; &nbsp; &nbsp; "type":"Get",

		&nbsp; &nbsp; &nbsp; &nbsp; "dataType":"json",

		&nbsp; &nbsp; &nbsp; &nbsp; "success":function(data){

		&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;// 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({&nbsp;

						&nbsp; &nbsp; title: '分享标题 | 分享给朋友', // 分享标题

						&nbsp; &nbsp; desc: '分享描述 | 分享给朋友', // 分享描述

						&nbsp; &nbsp; success: function () {

						&nbsp; &nbsp; &nbsp; // 设置成功

						&nbsp; &nbsp; &nbsp; console.log('分享成功');

						&nbsp; &nbsp; }

						})

					});

					wx.error(function(res){

			&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; console.log("configError:"+JSON.stringify(res));

			&nbsp; &nbsp; &nbsp; &nbsp; });

		&nbsp; &nbsp; &nbsp; &nbsp; }

		&nbsp; &nbsp; });

		});

	&lt;/script&gt;
回到顶部