@laurentgoudet/ionic-native-twitter-connect
v5.29.0-fork
Published
Ionic Native - Native plugins for ionic apps
Downloads
9
Readme
Twitter Connect
$ ionic cordova plugin add https://github.com/chroa/twitter-connect-plugin --variable FABRIC_KEY=<Fabric API Key> --variable TWITTER_KEY=<Twitter Consumer Key> --variable TWITTER_SECRET=<Twitter Consumer Secret>
$ npm install @ionic-native/twitter-connect
Usage Documentation
Plugin Repo: https://github.com/chroa/twitter-connect-plugin
Plugin to use Twitter Single Sign On Uses Twitter's Fabric SDK
import { TwitterConnect } from '@ionic-native/twitter-connect/ngx';
constructor(private twitter: TwitterConnect) { }
...
function onSuccess(response) {
console.log(response);
// Will console log something like:
// {
// userName: 'myuser',
// userId: '12358102',
// secret: 'tokenSecret'
// token: 'accessTokenHere'
// }
}
this.twitter.login().then(onSuccess, onError);
this.twitter.logout().then(onLogoutSuccess, onLogoutError);
Supported platforms
- Android
- iOS