meteor 实现 微信分享

时间:2015-08-20 12:36:03   收藏:0   阅读:927
  Template.hello.events({
    ‘click button‘: function () {
      // increment the counter when button is clicked
      Session.set(‘counter‘, Session.get(‘counter‘) + 1);

        var imgData = "不带描述头的base64图片数据";
        WeChat
            .share({
                title: ‘链接111111‘,
                description: ‘链接描述1111‘,
                url: ‘http://www.lawxin.com‘,
                thumbData:imgData
            }, WeChat.Scene.timeline, function () {
                alert(‘分享成功~‘);
            }, function (reason) {
                // 分享失败
                alert(reason);
            });
    }
  });

  

meteor add cordova:com.wordsbaking.cordova.wechat@https://github.com/vilic/cordova-plugin-wechat/tarball/76bfa31de051f44d3835d05b6cc51331e48e604c

 

enjoy!

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!