How does the success that captures the WeChat share action callback?

Source: Internet
Author: User
1. I can now share the dynamic to the circle of friends, but after the sharing is done why did the alert inside the success not be executed? Don't quite understand how this callback is made? I 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 success ');
callback function that is executed after the user confirms the share
},
Cancel:function () {
Alert (' 2 ');

Alert (' sharing failed ');
Callback functions executed after the user cancels the share
},
Fail:function (res) {
Alert (' 3 ');

Alert (res);
};
});
});

Reply content:

1. I can now share the dynamic to the circle of friends, but after the sharing is done why did the alert inside the success not be executed? Don't quite understand how this callback is made? I 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 success ');
callback function that is executed after the user confirms the share
},
Cancel:function () {
Alert (' 2 ');

Alert (' sharing failed ');
Callback functions executed after the user cancels the share
},
Fail:function (res) {
Alert (' 3 ');

Alert (res);
};
});
});

  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.