2

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?

Alauddin Ahmed
  • 1,128
  • 2
  • 14
  • 34

2 Answers2

1

Yes, in RNAccountKit.configure(), change responseType to 'code'

Siddharth
  • 11
  • 1
0

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))
 })
}
 });
kishan verma
  • 984
  • 15
  • 17