socialAccount property not retrieved

I’m having troubles with getting socialAccount property from BackendlessUser on the client side. When I get successful login callback from loginWithGooglePlusSdk there is no socialAccount provided in properties HashMap.

What should I do in order to get that property. Am I missing something?

http://support.backendless.com/public/attachments/3c21c378c7ca33fd34a2d6d7c600d2b5.png</img>

3c21c378c7ca33fd34a2d6d7c600d2b5.png

I am curious… what do you expect to get in that property? Why does the app even need it?

Well in Backendless console there is a reserved column socialAccount in User table so I was expecting that I will get it along other User table properties. App will have to store it so that we can distinguish between Google and Facebook login :slight_smile:

If you were to get the user object this way, then the socialAccount property is there:

    String userObjectId = "E0C5CDBC-02CF-FD44-FF85-956570596900";
    Backendless.Data.of( BackendlessUser.class ).findById( userObjectId, new AsyncCallback<BackendlessUser>()
    {
      @Override
      public void handleResponse( BackendlessUser user )
      {
         Log.i( "MY APP", user.getProperty( "socialAccount" ));
      }


      @Override
      public void handleFault( BackendlessFault fault )
      {


      }
    } );

Otherwise, for the object you get from the login, you’d know whether it is a google or facebook user, since the login calls for those systems are different, right?

Regards,
Mark

Otherwise, for the object you get from the login, you’d know whether it is a google or facebook user, since the login calls for those systems are different, right?

Yes, I agree. I decided to store social account in that way, definitely simpler than doing another async call. Thanks Mark!

“Otherwise, for the object you get from the login, you’d know whether it is a google or facebook user, since the login calls for those systems are different, right?”

Yes, if we call login after every app launch, but if you would like to use auto-login (like in my case), then you know nothing about the type of the login. Why I have to know it? Because I would like to disable the password changing if the user has logged in with Facebook. Btw yes, I could solve it, if I manage an offline database with userId-socialAccount entries, where I can store the login type at the first login, but since Backendless already stores this value, I think it would be more elegant if we can simply read it.

Hi I’m having the same issue. The weird thing is that I was able to get the property last week. “socialAccount”.
I too need it to stop users changing password as it’s not allowed.
For now I’m using
static var isSocialAccount: Bool {
return FBSDKAccessToken.currentAccessToken() != nil
}