用户注册



邮箱:

密码:

用户登录


邮箱:

密码:
记住登录一个月忘记密码?

发表随想


还能输入:200字
云代码 - php代码库

PHP 微信分享,QQ分享

2017-12-15 作者: 读你举报

[php]代码库

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


网友评论    (发表评论)


发表评论:

评论须知:

  • 1、评论每次加2分,每天上限为30;
  • 2、请文明用语,共同创建干净的技术交流环境;
  • 3、若被发现提交非法信息,评论将会被删除,并且给予扣分处理,严重者给予封号处理;
  • 4、请勿发布广告信息或其他无关评论,否则将会删除评论并扣分,严重者给予封号处理。


扫码下载

加载中,请稍后...

输入口令后可复制整站源码

加载中,请稍后...