Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save mrgulshanyadav/0c219a62d0c6761d993cef6777114488 to your computer and use it in GitHub Desktop.
Save mrgulshanyadav/0c219a62d0c6761d993cef6777114488 to your computer and use it in GitHub Desktop.
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