REST Social Login Problem

Hello,

I’m trying to setup social login via REST api call for Facebook and Twitter.
I’m following through the following documentations:
http://backendless.com/documentation/manage/mgmt_social_settings.htm
https://docs.google.com/document/d/16xc1iBBmEwzROeql4jQyvdmfeHU5Ek4UCfjPzBPiL3M/edit?usp=sharing

I want to map the following properties of backendless User table to respective social account props.

    name email (identity) birthDate country gender
I'm making a POST request via Fiddler to Facebook with the following request body: https://api.backendless.com/v1/users/social/oauth/facebook/request_url

{
“fieldsMapping” : {
“name”:“name”,
“email”: “email”
},
“redirect”: true,
“permissions”:“email”
}

It’s returning 500 error. See imgfb
http://support.backendless.com/public/0canJSgsupBS0lCVfaX5.jpg</img>

When I call Twitter api, it goes a bit further. Managed to return the Authorization Url in the Location Header. See imgtwitter1, imgtwitter2
http://support.backendless.com/public/OtnPxuVcE9XEDNDPTCsS.jpg</img>

http://support.backendless.com/public/LoFABhiyavUEMFx71rbD.jpg</img>

After I login and authorized app successfully, it redirect back to this backendless error:

{

    message: “Validation for the email property failed. Property value does not match the required pattern.”,
    code: 8023
}

Appreciate if someone could point me out how to achieve social login using backendless REST api calls as soonest.

Thanks.
May

  1. For facebook login try request without

“permissions”:“email”

  1. Twitter sends “email”:“1479318740”, that is not allowed by your validation pattern

Regards,
Kate.

  1. Facebook:
    I’ve removed the “permissions” : “email” from Facebook request body. I get back the following url in the header with the following error message once I browse the url.
    https://www.facebook.com/dialog/oauth/?client_id=366669213505169&redirect_uri=https://api.backendless.com/v1/users/social/facebook/authorize/FDC7AEB3-3475-1685-FFB1-E959DA592200&state=-1485639736

Given URL is not permitted by the application configuration.: One or more of the given URLs is not allowed by the App’s settings. It must match the Website URL or Canvas URL, or the domain must be a subdomain of one of the App’s domains.

  1. Twitter:
    How to retrieve the email from twitter? The validation pattern is the one backendless provided by default for email fields.

Problem in Android…
Cannot login with facebook same problem…

https://www.facebook.com/dialog/oauth/?client_id=XXXX&redirect_uri=https://api.backendless.com/v1/users/social/facebook/authorize/XXXXX&state=-1485639736

Please help