获取shareTicket?
发布于 5 年前 作者 yang09 11606 次浏览 来自 官方Issues

问题:通过小程序右上角的三个点功能里的分享,获取不了shareTicket,如果通过页面的button分享能获取

代码片段:

// #ifdef MP-WEIXIN

	onShareAppMessage(params) {

		wx.showShareMenu({

			withShareTicket: true

		})

		this.isShowShare = true

		const {

			title,

			id,

			logo

		} = this.articleInfo;

		const {

			globalData

		} = this; // 小程序转发监听不到成功与否,所以直接调用分享成功接口

		return {

			title: title,

			imageUrl: logo,

			path: \`/article/pages/detailsarticle/detailsarticle?sharerId=${globalData.userInfo.userId}&articleId=${id}&shareCode=${this.shareOnly}\`

		};

	},
1 回复

请提供出现问题的具体机型、微信版本号、系统版本号,以及能复现问题的代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html

回到顶部