Ich versuche, den Benutzer PhoneNumber/E-Mail mit Facebook Account Kit abrufen.Facebook Account Kit erfordern ein appsecret_proof Argument Fehler
ich immer einen Fehler als Antwort bekommen:
200: Server generated an error: 145: API calls from the server require an appsecret_proof argument
ich bereits die Möglichkeit, auf Facebook Entwickler Armaturenbrett deaktiviert.
Require app secret for server API calls
Hier ist mein Code:
public void onLoginPhone(final View view) {
final Intent intent = new Intent(getActivity(), AccountKitActivity.class);
AccountKitConfiguration.AccountKitConfigurationBuilder configurationBuilder =
new AccountKitConfiguration.AccountKitConfigurationBuilder(
LoginType.PHONE,
AccountKitActivity.ResponseType.CODE); // or .ResponseType.TOKEN
// ... perform additional configuration ...
intent.putExtra(
AccountKitActivity.ACCOUNT_KIT_ACTIVITY_CONFIGURATION,
configurationBuilder.build());
startActivityForResult(intent, APP_REQUEST_CODE);
}
und das ist onActivityResult:
AccountKit.getCurrentAccount(new AccountKitCallback<Account>() {
@Override
public void onSuccess(final Account account) {
// Get Account Kit ID
String accountKitId = account.getId();
// Get phone number
PhoneNumber phoneNumber = account.getPhoneNumber();
String phoneNumberString = phoneNumber.toString();
// Get email
String email = account.getEmail();
}
@Override
public void onError(final AccountKitError error) {
// Handle Error
}
});
Dieser spezifische API-Aufruf erfordert appsecret_proof und muss vom Server aus erfolgen. Was deaktiviert ist, besteht darin, es nicht für alle API-Aufrufe zu benötigen. – WizKid