Login With Facebook Issue

Hey guys I am using the Facebook SDK with Backendless. For some reason when a user logs in via Facebook, there FacebookID is saved in the email field. Attached is my code.
Thank you

Please, see this sample project as example.

I ran this project with my app credentials and I still got the same result.

Please provide your appID here or to support@backendless.com, we will check this issue with your app.

App ID = EE02B9EA-0271-5A5C-FFFA-206C38070700

Thank you

I have registered and logged in in your app with our sample project - you can see my email in users table of your app. So, I cannot reproduce this issue.

Rich, could you use another Facebook account (maybe create a new one) to check how it will work? Or give us your account which demonstrates the problem to support@backendless.com - we will investigate it.

Regards,
Slava

I was just able to recreate the issue using our Facebook Developer Account. The same one that is being using on our live app. I have used a different Facebook account from the one Rich is using to login and I even created a new facebook account just to test this out. This is happening for all of our users. These tests were all done using the sample Facebook Login Code you provided above. Is there anything that we need to change on our Facebook Developer Account that might be causing this problem? That is the only discrepancy between your test and our test right?

Let me quickly recap. I downloaded the project from google drive above. I updated our backendless app ID and iOS secret within that project. I also changed the Facebook App ID (AppID), URL (fb{AppID}), and name (Looq) in the info.plist file to match what we put into backendless. This is also the same information that is being used on our live app. I ran the project and used a facebook account that had never touched our backendless system. That same fb account had also never been authorized by our app for facebook login. This still send the Facebook ID instead of the email address when a user tried to login. Did you follow the same steps when trying to re-create the issue? If not, what did you do differently to get it to work?

Did you get rid of the birthdate field when you tried it on our account?

Nevin, give me this FB account - I’ll investigate the problem with it

We have reproduced this problem, our server-side team will investigate it. We let you know about a solution.

You should set readPermission property of FBSDKLoginButton:

        let loginButton = FBSDKLoginButton()
        loginButton.center = self.view.center
        loginButton.readPermissions = ["public_profile", "email", "user_friends"]
        self.view.addSubview(loginButton)

That solved it! Thanks for your help. Just out of curiosity, what was the cause of this? What were you doing differently from us?

The “readPermissions” property recently was added, so when a new Facebook app (v2.7) are created, this property have to be set.

Users who logged in through Facebook during this issues now have their Facebook IDs set as their email address. How do we change them to email addresses? This is now causing issues in the app for those users.

I know we may not be able to get that data from Facebook directly, but is it possible to manually change the email addresses? Backendless won’t let us manually change them in the console. We cannot even contact those users to try logging in again because we don’t have their email addresses.

If these records don’t have the additional properties, you could remove them, and these users will register again with their emails.

They do have additional properties. Also, we noticed that the app crashes if we delete users who have logged in already and try to open the app again.