千灯
千灯
  • 发布:2018-10-30 15:27
  • 更新:2018-10-30 15:30
  • 阅读:1875

分享图片至朋友圈

分类:HTML5+

以前写了一个分享图片至朋友圈的功能,一直好好的,突然有一天发现分享到朋友圈的图片只有自己能看到,分享成功了,别人却看不见(没有屏蔽)(以前别人也能看到),以下是代码,第一个方法是分享至微信好友,功能正常,望答疑,谢谢。

// 更新分享服务 函数
var shares=null,sharewx=null;
function updateSerivces(){
plus.share.getServices(function(s){
shares = s;
for(var i in s){
if('weixin'==s[i].id){
sharewx=s[i];
}
}
}, function(e){
mui.toast("分享失败");
});
}
function shareToWeixinFriend(){
sharewx.send( {type:'image',title: "ABC Phonics",pictures:['_www/images/share.png'],extra:{scene:"WXSceneSession"}}, function(){
// 分享成功
}, function(e){
// console.log( "分享失败:"+e.message );
});
}
function shareToCircleOfFriends(){
sharewx.send({title: "ABC Phonics",pictures:['_www/images/share.png'],extra:{scene:"WXSceneTimeline"}},function(){
// 分享成功
}, function(e){
// console.log( "分享失败:"+e.message );
});
}

2018-10-30 15:27 负责人:无 分享
已邀请:
冰凌桦

冰凌桦

看看是不是微信给屏蔽了

  • 千灯 (作者)

    没有

    2018-10-30 15:31

该问题目前已经被锁定, 无法添加新回复