Backendless Support
 
Solved

[REST] Error 400 for Facebook SDK login request

Hey,

I'm trying to use Facebook SDK while performing login (following https://backendless.com/documentation/users/rest/users_facebook_login.htm).

For:

  1. curl -H "Host: api.backendless.com" -H "application-id: CCD7530E-CD7B-3B6E-FF2E-B153FE232B00" -H "application-type: REST" -H "secret-key: <secret_key>" -H "Content-Type: application/json" -X POST -d "{\"accessToken\":\"<access_token>\"}" -v https://api.backendless.com/v1/users/social/facebook/sdk/login

I receive error 400:

  1. {"cause":null,"stackTrace":[{"methodName":"loginWithFacebook","fileName":"RunnerDecorator.java","lineNumber":239,"className":"com.backendless.services.users.impl.RunnerDecorator","nativeMethod":false},{"methodName":"loginWithFacebook","fileName":"UserServiceClientsProxyOrigin.java","lineNumber":203,"className":"com.backendless.services.users.impl.UserServiceClientsProxyOrigin","nativeMethod":false},{"methodName":"loginWithFacebook","fileName":"Social.java","lineNumber":143,"className":"controllers.Social","nativeMethod":false},{"methodName":"apply","fileName":"routes_routing.scala","lineNumber":4033,"className":"Routes$$anonfun$routes$1$$anonfun$applyOrElse$54$$anonfun$apply$54","nativeMethod":false},{"methodName":"apply","fileName":"routes_routing.scala","lineNumber":4033,"className":"Routes$$anonfun$routes$1$$anonfun$applyOrElse$54$$anonfun$apply$54","nativeMethod":false},{"methodName":"resultCall","fileName":"Router.scala","lineNumber":264,"className":"play.core.Router$HandlerInvokerFactory$$anon$4","nativeMethod":false},{"methodName":"invocation","fileName":"Router.scala","lineNumber":255,"className":"play.core.Router$HandlerInvokerFactory$JavaActionInvokerFactory$$anon$15$$anon$1","nativeMethod":false},{"methodName":"call","fileName":"JavaAction.scala","lineNumber":55,"className":"play.core.j.JavaAction$$anon$1","nativeMethod":false},{"methodName":"call","fileName":"TimeOutAction.java","lineNumber":21,"className":"com.backendless.TimeOutAction","nativeMethod":false},{"methodName":"call","fileName":"SimultaneousApiCallLimitAction.java","lineNumber":20,"className":"com.backendless.SimultaneousApiCallLimitAction","nativeMethod":false},{"methodName":"call","fileName":"CloseEntityManagerAction.java","lineNumber":18,"className":"com.backendless.CloseEntityManagerAction","nativeMethod":false},{"methodName":"call","fileName":"OriginAction.java","lineNumber":42,"className":"com.backendless.old.security.OriginAction","nativeMethod":false},{"methodName":"call","fileName":"ValidateApplication.java","lineNumber":49,"className":"com.backendless.old.security.ValidateApplication","nativeMethod":false},{"methodName":"apply","fileName":"JavaAction.scala","lineNumber":82,"className":"play.core.j.JavaAction$$anonfun$11","nativeMethod":false},{"methodName":"apply","fileName":"JavaAction.scala","lineNumber":82,"className":"play.core.j.JavaAction$$anonfun$11","nativeMethod":false},{"methodName":"liftedTree1$1","fileName":"Future.scala","lineNumber":24,"className":"scala.concurrent.impl.Future$PromiseCompletingRunnable","nativeMethod":false},{"methodName":"run","fileName":"Future.scala","lineNumber":24,"className":"scala.concurrent.impl.Future$PromiseCompletingRunnable","nativeMethod":false},{"methodName":"run","fileName":"HttpExecutionContext.scala","lineNumber":40,"className":"play.core.j.HttpExecutionContext$$anon$2","nativeMethod":false},{"methodName":"execute","fileName":"Execution.scala","lineNumber":46,"className":"play.api.libs.iteratee.Execution$trampoline$","nativeMethod":false},{"methodName":"execute","fileName":"HttpExecutionContext.scala","lineNumber":32,"className":"play.core.j.HttpExecutionContext","nativeMethod":false},{"methodName":"apply","fileName":"Future.scala","lineNumber":31,"className":"scala.concurrent.impl.Future$","nativeMethod":false},{"methodName":"apply","fileName":"Future.scala","lineNumber":492,"className":"scala.concurrent.Future$","nativeMethod":false},{"methodName":"apply","fileName":"JavaAction.scala","lineNumber":82,"className":"play.core.j.JavaAction$class","nativeMethod":false},{"methodName":"apply","fileName":"Router.scala","lineNumber":252,"className":"play.core.Router$HandlerInvokerFactory$JavaActionInvokerFactory$$anon$15$$anon$1","nativeMethod":false},{"methodName":"apply","fileName":"Action.scala","lineNumber":130,"className":"play.api.mvc.Action$$anonfun$apply$1$$anonfun$apply$4$$anonfun$apply$5","nativeMethod":false},{"methodName":"apply","fileName":"Action.scala","lineNumber":130,"className":"play.api.mvc.Action$$anonfun$apply$1$$anonfun$apply$4$$anonfun$apply$5","nativeMethod":false},{"methodName":"withContextClassLoader","fileName":"Threads.scala","lineNumber":21,"className":"play.utils.Threads$","nativeMethod":false},{"methodName":"apply","fileName":"Action.scala","lineNumber":129,"className":"play.api.mvc.Action$$anonfun$apply$1$$anonfun$apply$4","nativeMethod":false},{"methodName":"apply","fileName":"Action.scala","lineNumber":128,"className":"play.api.mvc.Action$$anonfun$apply$1$$anonfun$apply$4","nativeMethod":false},{"methodName":"map","fileName":"Option.scala","lineNumber":146,"className":"scala.Option","nativeMethod":false},{"methodName":"apply","fileName":"Action.scala","lineNumber":128,"className":"play.api.mvc.Action$$anonfun$apply$1","nativeMethod":false},{"methodName":"apply","fileName":"Action.scala","lineNumber":121,"className":"play.api.mvc.Action$$anonfun$apply$1","nativeMethod":false},{"methodName":"apply","fileName":"Iteratee.scala","lineNumber":483,"className":"play.api.libs.iteratee.Iteratee$$anonfun$mapM$1","nativeMethod":false},{"methodName":"apply","fileName":"Iteratee.scala","lineNumber":483,"className":"play.api.libs.iteratee.Iteratee$$anonfun$mapM$1","nativeMethod":false},{"methodName":"apply","fileName":"Iteratee.scala","lineNumber":519,"className":"play.api.libs.iteratee.Iteratee$$anonfun$flatMapM$1","nativeMethod":false},{"methodName":"apply","fileName":"Iteratee.scala","lineNumber":519,"className":"play.api.libs.iteratee.Iteratee$$anonfun$flatMapM$1","nativeMethod":false},{"methodName":"apply","fileName":"Iteratee.scala","lineNumber":496,"className":"play.api.libs.iteratee.Iteratee$$anonfun$flatMap$1$$anonfun$apply$14","nativeMethod":false},{"methodName":"apply","fileName":"Iteratee.scala","lineNumber":496,"className":"play.api.libs.iteratee.Iteratee$$anonfun$flatMap$1$$anonfun$apply$14","nativeMethod":false},{"methodName":"liftedTree1$1","fileName":"Future.scala","lineNumber":24,"className":"scala.concurrent.impl.Future$PromiseCompletingRunnable","nativeMethod":false},{"methodName":"run","fileName":"Future.scala","lineNumber":24,"className":"scala.concurrent.impl.Future$PromiseCompletingRunnable","nativeMethod":false},{"methodName":"run","fileName":"AbstractDispatcher.scala","lineNumber":41,"className":"akka.dispatch.TaskInvocation","nativeMethod":false},{"methodName":"exec","fileName":"AbstractDispatcher.scala","lineNumber":393,"className":"akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask","nativeMethod":false},{"methodName":"doExec","fileName":"ForkJoinTask.java","lineNumber":260,"className":"scala.concurrent.forkjoin.ForkJoinTask","nativeMethod":false},{"methodName":"runTask","fileName":"ForkJoinPool.java","lineNumber":1339,"className":"scala.concurrent.forkjoin.ForkJoinPool$WorkQueue","nativeMethod":false},{"methodName":"runWorker","fileName":"ForkJoinPool.java","lineNumber":1979,"className":"scala.concurrent.forkjoin.ForkJoinPool","nativeMethod":false},{"methodName":"run","fileName":"ForkJoinWorkerThread.java","lineNumber":107,"className":"scala.concurrent.forkjoin.ForkJoinWorkerThread","nativeMethod":false}],"localizedMessage":null,"message":null,"suppressed":[]}

I'm getting FB access token from Facebook. I also added Facebook App Id and Facebook App Secret to the Social Settings in my project's Backendless Dev Console.

What's going on?

Leave a Comment

Comments (4)

photo
1

Hi Matt,

I've created an internal ticket to investigate this problem. Soon one of our developers will contact you to help resolve your issue. You can refferrence it by it's id BKNDLSS-13200.

Thanks for patience.

Regards,

Stanislaw

photo
1

Looks like currently it works as supposed.

photo
1

Hi Matt,

Yes, this issue has been fixed. We missed to notify you here, sorry for that.

photo
1

No problem, thanks for fixing this in just one week.