Skip to content

Instantly share code, notes, and snippets.

@matthieu-D
Created July 28, 2017 13:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save matthieu-D/a54e8b421e012299c24c268f29fecf95 to your computer and use it in GitHub Desktop.
Save matthieu-D/a54e8b421e012299c24c268f29fecf95 to your computer and use it in GitHub Desktop.
import { TwitterConnect } from '@ionic-native/twitter-connect';
...
export class HomePage {
constructor(public navCtrl: NavController, public twitterConnect: TwitterConnect) { }
login() {
this.twitterConnect.login().then(this.onSuccess, this.onError);
}
onSuccess(response) {
console.log('response', response);
console.log(response.userName);
console.log(response.userId);
console.log(response.secret);
console.log(response.token);
}
onError(error) {
console.log('error', error);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment