1. 云栖社区>
  2. PHP教程>
  3. 正文

PHP 微信分享,QQ分享

作者:用户 来源:互联网 时间:2017-12-01 13:09:30

PHP 微信分享,QQ分享 - 摘要: 本文讲的是PHP 微信分享,QQ分享, PHP 微信分享,QQ分享,有需要的朋友可以参考下。 http://ossweb-img.qq.com/images/js/WXJssdk.js"></script>//微信分享初始化WXJssdk.init(funct

PHP 微信分享,QQ分享,有需要的朋友可以参考下。


http://ossweb-img.qq.com/images/js/WXJssdk.js"></script>

//微信分享初始化
WXJssdk.init(function(wx){
//分享到朋友
wx.onMenuShareAppMessage({
title:shareData.tTitle,
desc:shareData.tContent,
link:shareData.WXtimeLineLink+"?ADTAG=tgi.share.wx.message",
imgUrl:shareData.imgUrl,
success:function(){pgvSendClick({hottag:clickflow+'.share.message'});},
cancel:function(){pgvSendClick({hottag:clickflow+'.share.message_cancel'});}
});
//分享到朋友圈
wx.onMenuShareTimeline({
title:shareData.tTitle,
link:shareData.WXtimeLineLink+"?ADTAG=tgi.share.wx.timeline",
imgUrl:shareData.imgUrl,
success:function(){pgvSendClick({hottag:clickflow+'.share.timeline'});},
cancel:function(){pgvSendClick({hottag:clickflow+'.share.timeline_cancel'});}
});
//分享到手Q
wx.onMenuShareQQ({
title:shareData.tTitle,
desc:shareData.tContent,
link:shareData.QQtimeLineLink+"?ADTAG=tgi.share.wx.qq",
imgUrl:shareData.imgUrl,
success:function(){pgvSendClick({hottag:clickflow+'.share.qq'});},
cancel:function(){pgvSendClick({hottag:clickflow+'.share.qq_cancel'});}
});
//分享到QZone
wx.onMenuShareQZone({
title:shareData.tTitle,
desc:shareData.tContent,
link:shareData.QQtimeLineLink+"?ADTAG=tgi.share.wx.qzone",
imgUrl:shareData.imgUrl,
success:function(){pgvSendClick({hottag:clickflow+'.share.qzone'});},
cancel:function(){pgvSendClick({hottag:clickflow+'.share.qzone_cancel'});}
});
//分享到微博(默认是不需要的,可根据情况使用)
wx.onMenuShareWeibo({
title:shareData.tTitle,
desc:shareData.tContent,
link:shareData.QQtimeLineLink+"?ADTAG=tgi.share.wx.weibo",
imgUrl:shareData.imgUrl,
success:function(){pgvSendClick({hottag:clickflow+'.share.weibo'});},
cancel:function(){pgvSendClick({hottag:clickflow+'.share.weibo_cancel'});}
});
});
//手Q分享初始化
mqq.data.setShareInfo({
share_url: shareData.QQtimeLineLink+"?ADTAG=tgi.share.qq",
title: shareData.tTitle,
desc: shareData.tContent,
image_url:shareData.imgUrl
},
function(){pgvSendClick({hottag:clickflow+'.share.qq'});}
);

版权声明:本文为博主原创文章,未经博主允许不得转载。

以上是云栖社区小编为您精心准备的的内容,在云栖社区的博客、问答、公众号、人物、课程等栏目也有的相关内容,欢迎继续使用右上角搜索按钮进行搜索,以便于您获取更多的相关知识。