2

目前我正在使用react-native-facebook-account-kit来验证我的本地应用程序的电话号码。在这个插件中有一个名为 loginWithPhone() 的方法,它生成输入和验证 UI。所以我无法控制用户输入手机号码的那些字段。用户输入或验证后如何获取手机号码?

4

2 回答 2

1

是的,在 RNAccountKit.configure() 中,将 responseType 更改为 'code'

于 2019-02-16T03:47:59.630 回答
0

这对我有用!

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))
 })
}
 });
于 2019-04-30T11:37:12.593 回答