[Fixed]-Django rest auth facebook code for login

5👍

Only one of “Access Token” or “Code” field is required. (I have not tested the Code field but the Access Token field works, with the Code field left blank)

To use Access Token, after the user performs the “Login to Facebook” step on the client side using Facebook javascript SDK, you will receive a response from Facebook which includes “accessToken” for accessing data on Facebook. Simply paste this accessToken into the “Access Token” field and it will automatically login and/or create the user’s account from data retrieved from Facebook.

Obviously you can then perform the same process by posting the access token to the form all in javascript.

0👍

In the field of Access Token, Pass the User Access Token that you will get from Facebook developer dashboard(generate and debug), code field you can leave as blank. It will create user in your application and will return JWT token with user details.

👤PyMonk

Leave a comment