您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

捕获微信分享动作的success是怎么回调的?

2024/4/21 5:06:02发布22次查看
1.我现在可以分享动态到朋友圈了,但是在分享完成后为什么success里面的alert没有执行?不太懂这个回调是怎么弄得?之前没有用过。
2.代码如下
wx.ready(function() {
wx.onmenusharetimeline({
title: 'shareonweb', // 分享标题
link: 'http://www.baidu.com', // 分享链接
imgurl: 'http://www.mengchunyingxiang....', // 分享图标
success: function() {
//alert('1');
alert('分享成功');
// 用户确认分享后执行的回调函数
},
cancel: function() {
//alert('2');
alert('分享失败');
// 用户取消分享后执行的回调函数
},
fail: function (res) {
//alert('3');
alert(res);
};
});
});
回复内容: 1.我现在可以分享动态到朋友圈了,但是在分享完成后为什么success里面的alert没有执行?不太懂这个回调是怎么弄得?之前没有用过。
2.代码如下
wx.ready(function() {
wx.onmenusharetimeline({
title: 'shareonweb', // 分享标题
link: 'http://www.baidu.com', // 分享链接
imgurl: 'http://www.mengchunyingxiang....', // 分享图标
success: function() {
//alert('1');
alert('分享成功');
// 用户确认分享后执行的回调函数
},
cancel: function() {
//alert('2');
alert('分享失败');
// 用户取消分享后执行的回调函数
},
fail: function (res) {
//alert('3');
alert(res);
};
});
});
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product