Created
October 15, 2022 15:27
-
-
Save mrgulshanyadav/0c219a62d0c6761d993cef6777114488 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const options = { | |
url: 'https://graph.facebook.com/oauth/access_token', | |
method: 'POST', | |
params: { | |
'redirect_uri': bundle.inputData.redirect_uri, | |
'code': bundle.inputData.code, | |
'client_id': process.env.CLIENT_ID, | |
'client_secret': process.env.CLIENT_SECRET | |
}, | |
} | |
return z.request(options) | |
.then((response) => { | |
response.throwForStatus(); | |
const results = response.json; | |
// You can do any parsing you need for results here before returning them | |
return results; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment