Hello,
I use REST API and am firing https://api.backendless.com/v1/users/social/facebook/sdk/login POST request to register and login users. I’ve created beforeSocialLogin and afterSocialLogin handlers however they are never called. To check if debugger is set up correctly I’ve also created beforeSocialRegister handler and it looks ok - it is called when the user is created in a database.
What I’m trying to do is to:
Register or login user with provided Facebook access token.
Create a business logic event handler which will make a call to Facebook Graph API and update created user with more data.
So my questions:
Why the SocialLogin handlers are not called?
Let’s assume the handlers work as expected. Is the Facebook access token passed into them so I can make a call to Graph API?
Is it OK, from a security perspective, to store the access token in the Users table for each user?
Is there any other way to achieve this?
My app id is CCD7530E-CD7B-3B6E-FF2E-B153FE232B00
Thank you in advance for your response.
Best,
Matt
Hi, Matt.
Firstly i want to ask you to try create simple before and after SocialLogin handlers with System.out.println or Backendless.log for example. Then try this code in debug mode CodeRunner and in production when you will make social login. Please, use the latest version of CodeRunner. If you will have an error, please post it here.
Concerning access token: what token do you want to store ? Facebook ?
Whatever it was, you can save this data in any table and only user and role permissions would control access restrictions for it.
in debug and production.
Log is produced only for before register handler. Before and after social login are never called. I’m using latest CodeRunner version.
have the same issue with the social event handlers. beforeLogin / beforeRegister works fine, but socialBeforeLogin / socialBeforeRegister are never called. Is the solution for this problem is still in progress?