首页 > 后端开发 > php教程 > PHP 微信分享,QQ分享

PHP 微信分享,QQ分享

WBOY
发布: 2016-07-29 09:12:12
原创
1956 人浏览过

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,
            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'});}
    );

以上就介绍了PHP 微信分享,QQ分享,包括了方面的内容,希望对PHP教程有兴趣的朋友有所帮助。

相关标签:
来源:php.cn
本站声明
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板