Facebook login fieldMapping education

Hi. Just want to ask if how can we get user’s school/college in facebook using loginWithFacebook. thanks.

Here’s the code but education field did not save to the database.

function loginWithFacebook ()
{
socialLogin = true;
var propertiesMapping = { email: “email”, name: “fullname”, education : “school” };
var asyncCallback = new Backendless.Async(facebookLoginCallback, gotErrorReg);
Backendless.UserService.loginWithFacebook(propertiesMapping, “email”, asyncCallback);
}

I have created internal ticket BKNDLSS-12680 to investigate this issue

Hi, Rexon.

Looks like you are lacking permissions for the education info. Try “email,user_education_history” instead “email”.
Actually, before trying in with Backendless you can test your request with Facebook API Explorer that will help you with defining the correct field names and permissions needed.

Thanks a lot. It’s working. :smiley:

Hi. just want you to know that the JSON format string that was returned or saved into the database was invalid JSON format.

Here’s the sample returned JSON string:
[{school={id=534910186525909,name=University of Skateboarding},type=College,id=283891121949847}]

Which I expected to have is something like this:
[{school:{id:534910186525909,name:“University of Skateboarding”},type:“College”,id:283891121949847}]

So that It can be parse into json using JSON.parse()

Thanks…
~ rexon

Hi, Rexon.

We’ve opened a ticket BKNDLSS-12683 concerning JSON format and are working on it right now.

Hi!

We updated production server. Could you try it?

Hi…

It’s already returning the expected JSON string format. This is resolved.

Thanks
~ Rexon