my.showSharePanel
Use this API to trigger the sharing. Pass the value code to the request parameter from in page.onShareAppMessage.
Supported types of mini programs: DSL, H5+
Sample code
DSL
copy
// .js
my.showSharePanel();H5+
copy
AlipayJSBridge.call('shareTinyAppMsg', {}, function (res) {
alert('AlipayJSBridge showSharePanel:\n' + JSON.stringify(res));
});Error codes
Error code | Error message | Further action |
3 | unknown error! | Check whether the page context is correct. |
4 | forbidden error! | Debugging isn't supported in the mini program. |