Hi, is there any example of how can I use Facebook...
# support-questions-legacy
b
Hi, is there any example of how can I use Facebook provider in react native ?
r
hey!
@nkshah2 can help here
n
Hey @binouse, We dont have an example for facebook but I can help you with the flow. What you want to do is 1. Log in with Facebook (you can use the facebook sdk for this) 2. Fetch the session tokens from Facebook (The sdk should have a function for this), you need the access token from facebook 3. Call the
/signinup
API exposed by the SuperTokens SDK on the backend
b
I managed to get the access token from facebook, but what should the signinup body be composed of ?
Do I need the redirectURI, clientId, code ... ?
n
Copy code
{
  "redirectURI": "string",
  "thirdPartyId": "facebook",
  "authCodeResponse": {
    "access_token": "string",
    "id_token": "string"
  },
  "clientId": "string"
}
You dont need the code but you need the rest
b
Alright I'll try that thanks 🙏
Can you just tell me what is the id_token ? Something I should get from fb SDK ?
n
You can call the API with just the access token as well
b
Oh okay perfect
It is working perfectly ! Thanks a lot
n
Happy to help!
6 Views