

English
Share to Moments
, Share to Friends
and other interfacesFor more information, please refer to the official WeChat document Share and Favorites
Notice
weixin
uni.share({
provider: "weixin",
scene: "WXSceneSession",
type: 1,
success: function (res) {
console.log("success:" + JSON.stringify(res));
},
fail: function (err) {
console.log("fail:" + JSON.stringify(err));
}
});
var weixinShare = null;
plus.share.getServices(function(services) {
for (var i in services) {
var service = services[i];
// 获取微信分享对象
if (service.id == 'weixin') {
weixinShare = service;
break;
}
}
weixinShare.send( {
}, function(){
// 分享成功
}, function(err) {
// 分享操作失败
// err.code is the error code
})
}, function(err) {
// Failed to get services
})