Error in facebook login

I’m trying to setup the Facebook Login but I’m getting an error message after Facebook callback.

{“message”:“Not existing user token. Relogin user to update your user token”,“code”:3064}

I’m using loginWithFacebookSdk method and getting this error after BackendLess send the accessToken

accessToken: “CAAEsNYzLSiABADrmCEMBvKJNZAOhJY33yt005f2d3seYYaiZBHHQRuG8JW37BRbhFmoZB13wdtjEZCPcj1UAKqi8oDUZCXIKctfq9s5SH4EPSXZC9A8YhuLRFZBqG7IhT1eSYrq8qyUEWdWmfgEPdB4XBNawMdsByYuNDKLDuCOBiICbeVKdrBKhQ3rEfqCpXATeSbfc9yXsYIw5RK6RDgN”
expiresIn: 87863
signedRequest: “W_jG0dVfON01tvp6iG2sK7xJsrBsO4QCbSkut5V15SQ.eyJhbGdvcml0aG0iOiJITUFDLVNIQTI1NiIsImNvZGUiOiJBUUR0OHhaOHgzTlB5UWlhZ3A1ZXhlWmFmUHMxZGo3eVF6akhuZGU0RE5NOEpKcl9kcHBpRHlPNGFFckRPSlJQZUQ3SjZIR3ZNeFplVENXUGNhdEpvc2taSVRMXzdVT0tyUGF6Q0RNcjg5SmNrZFh1RWxjb0VJYkhmWV9SRXM5ZGJvTjlYaGFOeEpwV19sUHhidUUzcmx2Yl9VU0t3OXRRTU1oNlV3dHpUNGJ5UHFwaUhDeWhacFNxSF92ODJ3eHVoejZ5NXJTdjFCZGQ0OVV3QV9VS3o2YVFKRUxlcFJSOWZHaWRCVEJlMmlheDlmX2JNUDBfQzdSRzFUb1dEVS14T1RyRWFzdnp1NUJmQ1ppQ1ZNbXdfR1djb2ZPWWVWeEczNXh2b29LdlM0YV82Q21sR3RnLTVKNDdQLWJWRldiOElmcjV1R3lTRmRGUGZQRXZKQllfZ3FYMW5jcVJjS2I2b1BTNVRWUnZnSVlVNkEiLCJpc3N1ZWRfYXQiOjE0MzY4NDg1MzcsInVzZXJfaWQiOiI2NDcxNDQ0MDMifQ”
userID: “647144403”

Anyone could help me ? The app is setup OK on Facebook and BackendLess (API Key/Secret)

Ps: the step to authorize the app into Facebook is working fine

Hi!

Could you check how login works for not social user?
Do you receive the same result?
Or this error reproduces only with loginWithFacebookSdk method?

Regards,
Kate.

Hello,

Yes, I got this error only in Facebook Login. The normal login works fine.
I am using the Javascript SDK Backendless.

Could you provide part of your code which describes this issue?

var callback = function(e){
console.log(e);
};

Backendless.UserService.loginWithFacebookSdk(null, callback); 

Do you know if the problem is me or the Backendless?

Kate any news? I really need it and don’t know what’s happening.

Hi, Raul.

Issue has been investigated,
internal ticket created.

Hello, Raul!
This issue has been fixed.
Can you please recheck and inform us?

best regards,
Alex Navara

After I log in it returns this error: { code: 3022, message: “Unable to login user due to error: Could not approve social account.”, statusCode: 400 }

Raul, can you try the following steps:

  1. Create test folder in your backendless file service
  2. Download this archive: https://api.backendless.com/9EA10D52-5324-160A-FF4A-EC9281929700/v1/files/jstest.zip
  3. Unzip it and insert your application-id, secret-key and Facebook application key into index.html file
  4. Upload files to single folder of your applications’ file service
  5. Add develop.backendless.com to app domains section of your facebook application
  6. Open index.html in browser
  7. Open browser console and check the request result

Please, notify us about results.
Also, if it’s possible, try to login with another FB account.

best regards,
Alex Navara

Portuguese translation for English:
“The URL entered is not permitted by the application configuration: One or more of the provided URLs are not allowed in the application settings. The URL must match the URL of the website or URL of the Canvas, or domain should be a subdomain of one of the application domains.”

Now …

Raul, we’ve reproduced this issue and we’re fixing it now.
Just to confirm: can you try to login as developer of the used facebook application and inform me about result?
Thanks!
Alex Navara

Alex,

I’m not a developer from this app on FB but it is already in live.

Okay, it’s not necessary.
We shall release the fix in a few days and notify you about that.

Thanks Alex, I’ll be waiting.

Hi, Raul!

We’ve released the fix for this method.
Can you please verify?

regards,
Alex

Hi Alex,

My code:

Backendless.UserService.loginWithFacebookSdk([], new Backendless.Async(callback, callback, callback));

returns:
Object {message: “Internal server error with id 12998614-6C91-F0FA-FF02-BE34C095D700”, statusCode: 500}

What is the current version of backendless.js? I’m using 2.0.2 on my app.

Hi, Raul!
Change [] to null as the first argument if you mean that there is no mapping.
Please, notify me about result.
Alex