How to trigger the callback method of WeChat Mini Programs's forwarding function?

when I add open-type= "share" to the button, then print the result in the successful callback in the onShareAppMessage method as follows:

return {
  title: "",
  path: "page/show/pages/detail/detail",
  imageUrl: img,
  success: function(res) {
    console.log(res)
    console.log(111)
  },
  fail: function(res) {
    console.log(res)
  }
}
Neither the forwarding of the

button nor the forwarding callback in the upper right corner takes effect.

May.12,2022

Wechat has officially cancelled the callback method


as long as there is onShareAppMessage in js. This method can trigger three points in the upper right corner. Add the open-type= "share" button to trigger the button. I guess there's something wrong with it

.
Menu