Reputation: 1185
Currently im using react-native-facebook-account-kit to verify phone number for my native app. In this plugin there is a method called loginWithPhone() which is generating input and verification UI. So i dont have any control over that fields where users are typing their mobile number. How can i get the mobile number after the user typed it or after verification?
Upvotes: 2
Views: 786
Reputation: 1000
This work for me!
RNAccountKit.loginWithPhone()
.then((code) => {
if (!code) {
console.log('Login cancelled')
} else {
this._showMessage("Logged with phone. Token: "+JSON.stringify(code) );
RNAccountKit.getCurrentAccount()
.then((account) => {
console.log("Current account:"+ JSON.stringify(account))
})
}
});
Upvotes: 0