Facebook 帐户工具包验证无法正常工作
Facebook account kit verification not working properly
我已经实施了用于移动验证的 Facebook 帐户工具包。我打电话给 account kit activity 就像-
Intent intent = new Intent(SignUpActivity.this, AccountKitActivity.class);
AccountKitConfiguration.AccountKitConfigurationBuilder configurationBuilder =
new AccountKitConfiguration.AccountKitConfigurationBuilder(
LoginType.PHONE,
AccountKitActivity.ResponseType.TOKEN);
// ... perform additional configuration ...
configurationBuilder.setReadPhoneStateEnabled(true);
configurationBuilder.setReceiveSMS(true);
intent.putExtra(
AccountKitActivity.ACCOUNT_KIT_ACTIVITY_CONFIGURATION,
configurationBuilder.build());
startActivityForResult(intent, APP_REQUEST_CODE);
如果 android OS 高于 Lollipop,则在前往 AccountKitActivity
之前授予所需的权限。
它会读取手机号码,然后当我单击 "next" 按钮时,它会显示附加图像 (screenshot),尽管我正在从帐户工具包接收代码短信。为什么会发生这种情况以及如何摆脱这种情况?
What Android version are you using? For M+ you'll need to also request the permission via code (requestPermissions(new String[]{ permission }, requestCode);).
AccountKitConfiguration.AccountKitConfigurationBuilder configurationBuilder =
new AccountKitConfiguration.AccountKitConfigurationBuilder(LoginType.PHONE
, AccountKitActivity.ResponseType.TOKEN);
// 添加这些代码
configurationBuilder.setReadPhoneStateEnabled(真);
configurationBuilder.setReceiveSMS(真);
and give permission in manifest as
<uses-permission android:name="android.permission.READ_SMS" />
<uses-permission android:name="android.permission.RECEIVE_SMS" />
面板设置有问题。
"Require App Secret" 选项应保持关闭状态。
我已经实施了用于移动验证的 Facebook 帐户工具包。我打电话给 account kit activity 就像-
Intent intent = new Intent(SignUpActivity.this, AccountKitActivity.class);
AccountKitConfiguration.AccountKitConfigurationBuilder configurationBuilder =
new AccountKitConfiguration.AccountKitConfigurationBuilder(
LoginType.PHONE,
AccountKitActivity.ResponseType.TOKEN);
// ... perform additional configuration ...
configurationBuilder.setReadPhoneStateEnabled(true);
configurationBuilder.setReceiveSMS(true);
intent.putExtra(
AccountKitActivity.ACCOUNT_KIT_ACTIVITY_CONFIGURATION,
configurationBuilder.build());
startActivityForResult(intent, APP_REQUEST_CODE);
如果 android OS 高于 Lollipop,则在前往 AccountKitActivity
之前授予所需的权限。
它会读取手机号码,然后当我单击 "next" 按钮时,它会显示附加图像 (screenshot),尽管我正在从帐户工具包接收代码短信。为什么会发生这种情况以及如何摆脱这种情况?
What Android version are you using? For M+ you'll need to also request the permission via code (requestPermissions(new String[]{ permission }, requestCode);).
AccountKitConfiguration.AccountKitConfigurationBuilder configurationBuilder =
new AccountKitConfiguration.AccountKitConfigurationBuilder(LoginType.PHONE
, AccountKitActivity.ResponseType.TOKEN);
// 添加这些代码 configurationBuilder.setReadPhoneStateEnabled(真); configurationBuilder.setReceiveSMS(真);
and give permission in manifest as
<uses-permission android:name="android.permission.READ_SMS" />
<uses-permission android:name="android.permission.RECEIVE_SMS" />
面板设置有问题。 "Require App Secret" 选项应保持关闭状态。