iOS Swift login with facebook

Hey guys

Sorry if this is a stupid question but i cant find any details about this issue anywhere. In my app i have 2 kinds of login a regular email/password login and a facebook login (using the fbsdk, per your facebook login guide).
My issue is if some one has already signed up with a email/password, logs out and then decides to log in with facebook there details are not updated, the returned user object has null for facebook id, fb_first_name, fb_last_name etc. Is there a way to update this information in backendless as the method backendless.userService.loginWithFacebookSDK() does not retun any values from the facebook side.
My initial thought was to check the user object for null values and then update the user myself, but as it does not return any of the field mappings from facebook i can not do that.

Thanks in advance.

Hi Mat,

Currently the user object from “classic” Backendless login is not “synchronized” with the user object created when a user logs in with the Facebook credentials. Essentially, they will be ‘recorded’ as two separate users.

Mark

Hi Mark thanks for the reply. From what you are saying for the situation i described in my original post it would create 2 separate users? Because currently this isn’t happening.
i had setup a “classic” backendless user, once i sign out of the classic and then sign in with facebook it logs me in (as the classic and facebook have the same email).
But what you are saying is it should create 2 separate users presumably with the same email address, which is not happening unfortunatly as that would be ideal.

Hi Mat,

It is my understanding that two separate users should be created. There is an item on our roadmap to get to the behavior you’re describing, but I do not think we have implemented it yet. I will check and let you know.

Regards,

Mark

Hi Mat,

I checked with the dev team and here’s what I learned:

If a user registers using our “classic” registration API and email is the identity, then upon subsequent social login (say with FB or Google) the email property is used to look up the user. If the user with the email already exists, then that user object is used.

Hope this helps in clarifying the behavior you’re observing.

Mark