onShareAppMessage
在 Page 中定义 onShareAppMessage 函数,设置该页面的分享信息。
•只有定义了此事件处理函数,右上角菜单才会显示“分享”按钮
•用户点击分享按钮的时候会调用
•此事件需要 return 一个 Object,用于自定义分享内容

官方文档: https://mp.weixin.qq.com/debug/wxadoc/dev/api/share.html#onshareappmessage
但是这个id很多人不明白是什么id,之前我也不明白,后来发现这个id就是你要分享的这篇文章的id,但是一定要注意异步与同步的问题

网友评论