1. I can now share updates to my circle of friends, but why is the alert in success not executed after the sharing is completed? I don’t quite understand how to get this callback? Haven't used it before.
2. The code is as follows
wx.ready(function() {
wx.onMenuShareTimeline({
title: 'shareonweb', // Share title
link: 'http://www.baidu.com', // Share link
imgUrl: 'http://www.mengchunyingxiang....', // Share icon
success: function() {
//alert('1');
alert('Sharing successful');
// Callback function executed after the user confirms sharing
},
cancel: function() {
//alert('2');
alert('Sharing failed');
//Callback function executed after the user cancels sharing
},
fail: function (res) {
//alert('3');
alert(res);
};
});
});
1. I can now share updates to my circle of friends, but why is the alert in success not executed after the sharing is completed? I don’t quite understand how to get this callback? Haven't used it before.
2. The code is as follows
wx.ready(function() {
wx.onMenuShareTimeline({
title: 'shareonweb', // Share title
link: 'http://www.baidu.com', // Share link
imgUrl: 'http://www.mengchunyingxiang....', // Share icon
success: function() {
//alert('1');
alert('Sharing successful');
// Callback function executed after the user confirms sharing
},
cancel: function() {
//alert('2');
alert('Sharing failed');
//Callback function executed after the user cancels sharing
},
fail: function (res) {
//alert('3');
alert(res);
};
});
});