信赖的阿涛
信赖的阿涛
  • 发布:2023-04-06 10:36
  • 更新:2023-07-20 22:58
  • 阅读:238

App端如何实现分享小程序到朋友圈

分类:uni-app

从app端分享小程序到朋友圈。
uni.share({
provider: 'weixin',
scene: "WXSceneTimeline",
type: 5,
imageUrl: _this.$test+'/media/'+imageUrl,
title: title,
miniProgram: {
id: '',
path: 'pages/news/news?news_id='+_this.num,
type: 0,
webUrl: ''
},
success: ret => {
console.log(JSON.stringify(ret));
},
fail(err){
console.log(err);
}
})

2023-04-06 10:36 负责人:无 分享
已邀请:
昭昭L

昭昭L - 开心就好

好像不支持在朋友圈发小程序

星拾夜暝

星拾夜暝

在小程序的代码中找到分享的代码段,通常在onShareAppMessage()函数中。
在该函数中,找到scene参数,该参数包含了分享的场景信息。
将scene参数的值修改为目标聊天好友的OpenID,可以通过wx.getUserInfo()等API获取到。
重新分享小程序,即可看到分享到目标聊天好友的界面。

朱小

朱小

type5是分享给好友小程序诶,不是分享到朋友圈 发小程序诶,有办法app分享到朋友圈打开时小程序链接么

要回复问题请先登录注册