ホームページ >バックエンド開発 >PHPチュートリアル >PHP WeChat共有、QQ共有
http://ossweb-img.qq.com/images/js/WXJssdk.js">
//微信分享初化
WXJssdk.init(function(wx){
//分享到朋友
wx.onMenuShareAppMessage({
title:shareData.tTitle,
desc:shareData.tContent,
link:shareData.WXtimeLineLink+"?ADTAG=tgi.share.wx.message",
imgUrl:shareData.imgUrl,
成功: 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,
成功: 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'});}
);
以上、PHP マイクロ信共有、QQ 共有を紹介しましたが、側面の内容も含まれており、PHP 教則に関心のある友人の助けになることを望みます。