• 腾讯对外分享组件接口文档


    http://open.mobile.qq.com/api/component/share

    组件地址

    http://qzonestyle.gtimg.cn/qzone/qzact/common/share/share.js

    组件功能

    定制微信,手机QQ,QQ空间APP内的分享内容。

    组件接口


    /** * 定制接口 * @param opts 定制内容 */ setShareInfo({ title: '父爱,在你看不到的地方', // 分享标题 summary: '父爱如山,感觉不到只因身在此山中', // 分享内容 pic: 'http://qzonestyle.gtimg.cn/aoi/sola/20150617094556_OvfOpoRKRB.png', // 分享图片 url: 'http://qzs.qzone.qq.com/qzone/qzact/act/2015/father-day-m/index.html', // 分享链接 // 微信权限验证配置信息,若不在微信传播,可忽略 WXconfig: { swapTitleInWX: true, // 是否标题内容互换(仅朋友圈,因朋友圈内只显示标题) appId: appId, // 公众号的唯一标识 timestamp: timestamp, // 生成签名的时间戳 nonceStr: nonceStr, // 生成签名的随机串 signature: signature // 签名 } });

    未使用模块加载器

    <script type="text/javascript" src="http://qzonestyle.gtimg.cn/qzone/qzact/common/share/share.js"></script>
    <script type="text/javascript">
         setShareInfo({
             title:          '父爱,在你看不到的地方',
             summary:        '父爱如山,感觉不到只因身在此山中',
             pic:            'http://qzonestyle.gtimg.cn/aoi/sola/20150617094556_OvfOpoRKRB.png',
             url:            'http://qzs.qzone.qq.com//qzone/qzact/act/2015/father-day-m/index.html',
             WXconfig:       {
                 swapTitleInWX: true,
                 appId: '',
                 timestamp: '',
                 nonceStr: '',
                 signature: ''
             }
         });
    </script>
    

    使用seajs

    seajs.use('http://qzonestyle.gtimg.cn/qzone/qzact/common/share/share.js', function(setShareInfo) {
         setShareInfo({
             title:          '父爱,在你看不到的地方1',
             summary:        '父爱如山,感觉不到只因身在此山中2',
             pic:            'http://qzonestyle.gtimg.cn/aoi/sola/20150617094556_OvfOpoRKRB.png',
             url:            'http://qzs.qzone.qq.com//qzone/qzact/act/2015/father-day-m/index.html',
             WXconfig:       {
                 swapTitleInWX: true,
                 appId: '',
                 timestamp:'',
                 nonceStr: '',
                 signature: ''
             }
         });
    });
    

    使用requirejs

    require(['http://qzonestyle.gtimg.cn/qzone/qzact/common/share/share.js'], function(setShareInfo) {
        setShareInfo({
            title:          '父爱,在你看不到的地方',
            summary:        '父爱如山,感觉不到只因身在此山中',
            pic:            'http://qzonestyle.gtimg.cn/aoi/sola/20150617094556_OvfOpoRKRB.png',
            url:            'http://qzs.qzone.qq.com//qzone/qzact/act/2015/father-day-m/index.html',
            WXconfig:       {
                swapTitleInWX: true,
                appId: '',
                timestamp:'',
                nonceStr: '',
                signature: ''
            }
        });
    });
  • 相关阅读:
    自制对焦测试卡
    RHEL AS4上配置snmpd遇到问题及解决办法笔记
    一个OID资料集中网站
    mrtg配置小问题
    sybase 优化总结[zt]
    [ZT] solarwinds 2002工程师版本(带注册机)
    推荐四个网盘资源搜索工具
    Hadoop 集群搭建
    分布式文件系统 HDFS 简介
    HDFS Shell 命令实操
  • 原文地址:https://www.cnblogs.com/qianduanjingying/p/5150975.html
Copyright © 2020-2023  润新知