本文整理匯總了TypeScript中@ionic/cloud-angular.FacebookAuth類的典型用法代碼示例。如果您正苦於以下問題:TypeScript FacebookAuth類的具體用法?TypeScript FacebookAuth怎麽用?TypeScript FacebookAuth使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
在下文中一共展示了FacebookAuth類的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: logout
logout() {
//switch based on social login, could be better
if(this.user.social && this.user.social.facebook) {
this.facebookAuth.logout();
} else {
this.auth.logout();
}
this.navCtrl.setRoot(LoginPage);
}
示例2: logout
logout() {
this.facebookAuth.logout();
this.user.clear();
this.user.social.facebook.uid = null;
this.currUser = {
id: '0',
name: ''
};
this.toastService.showToast('Successfully signed out');
}
示例3: authenticate
authenticate() {
this.facebookAuth.login().then(() => {
this.currUser = {
id: this.user.social.facebook.uid,
name: this.user.social.facebook.data.full_name,
photo: this.user.social.facebook.data.profile_picture
};
this.toastService.showToast('Successfully signed in');
});
}
示例4: doFacebook
doFacebook() {
console.log('do FB');
this.facebookAuth.login().then(() => {
this.navCtrl.setRoot(HomePage);
});
}