I have the following code for the facebook login in an android Fragment:
loginButton = (LoginButton) fragment.findViewById(R.id.login_button);
loginButton.setReadPermissions("user_friends");
// If using in a fragment
loginButton.setFragment(this);
// Other app specific specialization
// Callback registration
loginButton.registerCallback(C.callbackManager, new FacebookCallback<LoginResult>() {
@Override
public void onSuccess(LoginResult loginResult) {
Log.wtf("onSuccess",loginResult.toString());
}
@Override
public void onCancel() {
Log.wtf("onCancel","");
}
@Override
public void onError(FacebookException exception) {
Log.wtf("onError",exception.toString());
}
});
The login button appears and when I click it a pop up appears asking for the login. I can enter the email and password but the button to send the credentials to facebook's servers does not function, not even click.
Sometimes I get these errors when the first menu (where the user is asked the credentials) doesn't open (happens frequently):
04-18 17:36:12.936 1607-1607/ E/ActivityThread﹕ Failed to find provider info for com.facebook.katana.provider.PlatformProvider
04-18 17:36:12.936 1607-1607/ E/ActivityThread﹕ Failed to find provider info for com.facebook.wakizashi.provider.PlatformProvider
Aucun commentaire:
Enregistrer un commentaire