Backendless Support
 
Solved

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.

  1. 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 )

    {

    .....

    }

    } );

Leave a Comment

Comments (9)

photo
1

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

photo
1

Hi,

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

photo
1

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

photo
1

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.

photo
1

Are you testing loginWithGooglePlus or LoginWithGooglePlusSdk methods?

Anton

photo
1

Hi,

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

photo
photo
1

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

  1. private void loginToBackendlessWithGoogle()
  2. {
  3. boolean rememberLogin = rememberLoginBox.isChecked();
  4. Backendless.UserService.loginWithGooglePlusSdk(gpAccessToken, new AsyncCallback<BackendlessUser>() {
  5. @Override
  6. public void handleResponse(BackendlessUser backendlessUser) {
  7. isLoggedInBackendless = true;
  8. startLoginResult(backendlessUser);
  9. }
  10. @Override
  11. public void handleFault(BackendlessFault fault) {
  12. startLoginResult(fault.toString(), false);
  13. }
  14. }, rememberLogin);
  15. }

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

Anton

photo
1

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

photo
1

Hi Tomáš,

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

photo