Login whith facebook Internal client exception

I call this, and response is: Caused by: BackendlessException{ code: ‘Internal client exception’, message: ‘null’ }. When I call native facebook login from facebook SDK all is good.

final Map<String, String> facebookFieldMappings = new HashMap<String, String>();
facebookFieldMappings.put("email", "email");
facebookFieldMappings.put("name","name");

final List<String> permissions = new ArrayList<String>();
permissions.add( "email" );
permissions.add("public_profile");

Backendless.UserService.logout();

Backendless.UserService.loginWithFacebookSdk( AuthActivity.this,
        facebookFieldMappings,
        permissions,
        callbackManager,
        new AsyncCallback<BackendlessUser>()
        {
            @Override
            public void handleResponse( BackendlessUser loggedInUser )
            {
 .....
            }

            @Override
            public void handleFault( BackendlessFault fault )
            {
               .....
            }
        } );

Hi Tomáš,

These methods are deprecated and current implementation of loginWithFacebookSdk methods differ from the one you provided. Please download the sample project for Android in Codegeneration section (https://prnt.sc/idm9oc) and see how it works.

Best Regards

Hi,

thanks, its work. But how map field photo(avatar photo) from facebook? What is the name of avatar photo parameter?

It’s profile_pic if I’m not mistaking. But it may require permissions set in your facebook application. Here is a useful link for property mapping: https://developers.facebook.com/docs/graph-api/reference/user

Anton

Now, I have problem whith google + login. I set everting like at https://backendless.com/documentation/users/android/users_login_with_google.htm I do call as on example.

Are you testing loginWithGooglePlus or LoginWithGooglePlusSdk methods?

Anton

Hi,

loginWithGooglePlus as see the sample project for Android in Codegeneration section.

If you are using a sample from Codegeneration it uses loginWithGooglePlusSdk methods

private void loginToBackendlessWithGoogle()
{
boolean rememberLogin = rememberLoginBox.isChecked();
Backendless.UserService.loginWithGooglePlusSdk(gpAccessToken, new AsyncCallback<BackendlessUser>() {
@Override
public void handleResponse(BackendlessUser backendlessUser) {
isLoggedInBackendless = true;
startLoginResult(backendlessUser);
}

@Override
public void handleFault(BackendlessFault fault) {
startLoginResult(fault.toString(), false);
}
}, rememberLogin);
}

Could you please check again? You are using v4 of Backendless, right?

Anton

Hi,

I don’t use loginWithGooglePlusSdk but loginWithGooglePlus. Version of my backendless API is 3.0 no 4.0. Login with Facebook, login with Twitter work fine as on sample project for Android in Codegeneration section (your response from 15:49:46). But loginWithGooglePlus not work and response this wrong screen http://support.backendless.com/attachments/3456

Hi Tomáš,

As Anton mentioned above, the non-SDK methods have been deprecated (both for Facebook and Google), so you should use loginWithGooglePlusSdk instead.