• 微信移动客户端内部浏览器分享到朋友圈,QQ空间代码


    http://mp.weixin.qq.com/wiki/11/74ad127cc054f6b80759c40f77ec03db.html

    <script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>

    <script type="text/javascript">

    wx.config({
      debug: false,
      appId: '',
      timestamp: 1460701064,
      nonceStr: '',
      signature: '',
      jsApiList: [
        'onMenuShareTimeline',
        'onMenuShareAppMessage',
        'onMenuShareWeibo'
      ]
    });

    wx.ready(function () {
    var shareData = {
    title : '',
    content : '',
    imageUrl : '',
    link : ''
    };

    var shareToTimeline = function() {
    wx.onMenuShareTimeline({
    title : shareData.content,
    link : shareData.link,
    imgUrl : shareData.imageUrl
    });
    };

    var shareToAppMessage = function() {
    wx.onMenuShareAppMessage({
    title : shareData.title,
    desc : shareData.content,
    link : shareData.link,
    imgUrl : shareData.imageUrl,
    type : '', // 分享类型,music、video或link,不填默认为link
    dataUrl : '' // 如果type是music或video,则要提供数据链接,默认为空
    });
    };

    var shareToWeibo = function() {
    wx.onMenuShareWeibo({
    title : shareData.title, // 分享标题
    desc : shareData.content, // 分享描述
    link : shareData.link, // 分享链接
    imgUrl : shareData.imageUrl // 分享图标
    });
    };

    function share() {
    shareToTimeline();
    shareToAppMessage();
    shareToWeibo();
    }
    share();


    window.setShareData = function(data) {
    shareData['title'] = data['title'];
    shareData['content'] = data['content'];
    shareData['imageUrl'] = data['imageUrl'];
    share();
    };
    });
    </script>

  • 相关阅读:
    并发技术
    体系结构基础
    TCP协议总结
    HTTP协议总结
    SQL Cookbook:使用字符串
    模运算的基本性质
    682. Baseball Game
    编程之法:面试和算法心得(字符串的全排列)
    编程之法:面试和算法心得(最长回文子串)
    编程之法:面试和算法心得(回文判断)
  • 原文地址:https://www.cnblogs.com/zhuliming-java/p/5395365.html
Copyright © 2020-2023  润新知