Login Facebook SDK Swift Email returning FacebookId

Login works fine.
But, although email is mapped, it always returns facebookId.
id was working, but now it returns null.
let fieldsMapping = [
“id” : “facebookId” ->returns “<null>”
“email”: “email” ->returns {facebookId}

Hi James,

I just checked this issue with our FacebookLogin sample.
Here is a log:
http://support.backendless.com/public/attachments/3e11c6e0094928bd40efc189068503f3.png</img>
and the result on the app dashboard:
http://support.backendless.com/public/attachments/c62eaa8036b2b21f194a575b9bbd9821.png</img>

So, it works fine for me.

Maybe, you should update the latest libs release for example, from Backendless SDK github?

Regards,
Slava

I have updated and I’m using swift, but it is still giving me the ID for email :frowning:

2016-02-26 20:04:22.141 TestApp[3794:226427] -canOpenURL: failed for URL: “fbauth2:/” - error: “(null)”

2016-02-26 20:04:22.147 TestApp[3794:226427] -canOpenURL: failed for URL: “fbauth2:/” - error: “(null)”

user: <BackendlessUser> {

“___class” = Users;

“__meta” = “{“relationRemovalIds”:{},“selectedProperties”:[“fb_last_name”,“gender”,“fb_first_name”,“created”,“facebookId”,“ownerId”,”__meta","__updated__meta",“name”,"___class",“updated”,“objectId”,“email”],“relatedObjects”:{}}";

created = “2016-02-24 10:46:22 +0000”;

email = 11225514XXXXXXX;

facebookId = “<null>”;

“fb_first_name” = James;

“fb_last_name” = Gabb;

gender = male;

lastLogin = “2016-02-26 09:04:25 +0000”;

name = “James Gabb”;

objectId = “EF9AC4FF-E8C4-A46D-FF82-XXXXXXXXX”;

ownerId = “<null>”;

password = “<null>”;

updated = “2016-02-25 12:38:01 +0000”;

“user-token” = “36063252-DD31-C378-FFDF-XXXXXXXXXXX”;

}

Hi, James. Do you use “email” permission? It is needed to get email from Facebook.
Also sometimes Facebook remembers what permissions you granted for specific Facebook application. You can clear this information as shown on these screenshots: http://prntscr.com/a7bhs7 http://prntscr.com/a7bi96
And of course you have to delete the previous user in the table.

We are having the same issue.

How do we use email permissions? What do you mean by that? Is it being done in the sample app? We ran the sample app with our Backendless app ID and Facebook ID and it is still not working.

Hi @Nevin,
Could you please describe your problem more precisely in separate topic?
Artur

Vyacheslav was able to help us with this. Thanks a lot for getting back to me. See the issue below.

http://support.backendless.com/t/login-with-facebook-issue