Issues with facebook login

Hi,I have a problem with facebook login
Here is my flow
When user clicks on facebook login button.I call loginWithFacebookSDK and after that I will navigate usre to editing page for editing info grabbed from loginWithFacebookSDK.
When user has an email everything works fine,but when user doesnt provide access to email or registered in facebook with mobile, loginWithFacebookSDK returns an error,with email validation failing.
I have found some solutions,but backendless doesnt provide any login mechanism with facebook id,or objectID.
What are your suggestions?

Hi Narek,

try to change user identity in administration console from email to another field you need and receive always.

Regards,
Stanislaw

Hi Stanislaw

thanks for answer.
Other question,can I somehow check in loginwithFacebook function if email doesnt exists send default value?can I somehow override loginWithfacebook
And can I create user with default registering,but somehow mention it to be social account,I putted socailAccount-Facebook and facebookId,but it seams I missed one property

Hi Narek,

Please try our sample project, which demonstrates loginWithFacebookSDK usage (see in attachment).
It works for us.

You could try it with our appId and secretKey, then set yours, how will it work for you?

Regards,
Slava

TestFacebookSDKLogin.zip (21.5MB)

Server reported an error: FAULT = ‘3012’ [Unable to register user. Property ‘email’ is required] <Unable to register user. Property ‘email’ is required>
here is what I get when user has no email

It seams with found solution))

Thank you so much

Narek, please clarify: is this issue solved?

Truly said,no its not solved our problems,or lets say it solved particullary

becuase in our backend we have required field validations for some of properties,username,email,gender,birthday
and because of it we get error when user doesnt provide us one of this datas.
We dont want to disable that required fields,and have to get data from facebook and create a user by ourselves
It will be more beautiful if you could provide us another solution,like add some method in sdk,which will login in social account with facebookId for example,or loginwithfacebook function will return user which yet doesnt create,and we could add all missing fields

Facebook user is able to login to Backendless backend using method ‘loginWithFacebookSDK’ of Backendless SDK, all other scenarios have to use Facebook SDK.

Ok,in that case when I create user with loginwithfacebooksdk,I cant set password for that user,but when I create user with just registering,and set socialAccount and facebookId its allows me to set that user password field

Can you say,how backendless seperates social users from other type of users? can I create user and mark it to be social if I have his facebook id and token?

http://support.backendless.com/public/attachments/5aea568e1c7e10585b8d5f531108c653.png&lt;/img&gt;

strage… does it enable to set it from code?

I have set it,but somehow users ,which I set this field from code doesnt became social users
If it possible to set it,I will check it tommorow and will tell you about the results
Thanks for helping