onShareAppMessage 怎么判断是否分享成功呢?

小程序 文章 2022-03-18 16:00 2046 0 全屏看文

AI助手支持GPT4.0

onShareAppMessage 怎么判断是否分享成功呢?How does onShareAppMessage judge whether the sharing is successful?

onShareAppMessage 怎么判断是否分享成功呢?

success:function 方法没有办法监听分享成功事件呢, 想记录一下文章分享的次数

// 自定义分享

onShareAppMessage() {

let _this = this;

_this.share();


    return {

      title: this.articleInfo.title,

      path: '/pagesA/articleDetail/articleDetail?id=' + this.articleInfo.id,

      imageUrl: this.articleInfo.image,

  success:function(res) {

  _this.share();

  },

  fail: function () {

  uni.showToast({

title: '分享失败',

icon: 'none',

duration: 2000

  });

  },

  complete: function (c) {

  },

  

    }

},

success:function 方法没有办法监听分享成功事件呢, 想记录一下文章分享的次数 // 自定义分享 onShareAppMessage() { let _this = this; _this.share(); return { title: this.articleInfo.title, path: '/pagesA/articleDetail/articleDetail?id=' + this.articleInfo.id, imageUrl: this.articleInfo.image, success:function(res) { _this.share(); }, fail: function () { uni.showToast({ title: '分享失败', icon: 'none', duration: 2000 }); }, complete: function (c) { }, } },

回答:

社区技术运营专员-Jahozheng:

不支持此功能。

星儿:谢谢
星儿:谢谢
八九:

判断不了

星儿:谢谢
星儿:谢谢
青寒:

官方早就特意取消了分享结果提供。

你无法获知用户是否已成功完成了分享。

星儿:谢谢
星儿:谢谢

-EOF-

AI助手支持GPT4.0