2.0.0 • Published 6 years ago

mswechat v2.0.0

Weekly downloads
1
License
ISC
Repository
-
Last release
6 years ago

import { Injectable } from '@angular/core'; import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core'; import { Observable } from 'rxjs/Observable';

@Plugin({ pluginName: 'MSWeChat', plugin: 'com.mansuo.plugins.wechat', pluginRef: 'WeChat', platforms: 'Android' })

@Injectable() export class MSWeChat extends IonicNativePlugin { @Cordova({ observable: true }) oauth(): Observable {return ;}

/**
 * 分享朋友圈
 * WeChat.shareTimeline({
 *      title: '标题',
 *      description: '描述',
 *      link: '链接地址',
 *      image: '封面地址'
 *  })
*/
@Cordova({
  callbackOrder: 'reverse',
  observable: true
})
shareTimeline( params: any ): Observable<any> { return; }

/**
 * 分享给好友
 * WeChat.shareAppMessage({
 *      title: '标题',
 *      description: '描述',
 *      link: '链接地址',
 *      image: '封面地址'
 *  })
*/
@Cordova({
  callbackOrder: 'reverse',
  observable: true
})
shareAppMessage( params: any ): Observable<any> { return; }

}

ionic cordova plugin add mswechat --variable WECHAT_APP_ID=xxxx

2.0.0

6 years ago

1.1.0

6 years ago

1.0.0

6 years ago