Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@shamdasani
Created January 22, 2017 10:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shamdasani/677cedb8dc5dd8266563c398890020ba to your computer and use it in GitHub Desktop.
Save shamdasani/677cedb8dc5dd8266563c398890020ba to your computer and use it in GitHub Desktop.
//Instagram ID
function instagramID() {
return fetch('https://api.instagram.com/v1/users/self/?access_token='+queryParams.code)
.then((response) => response.json())
.then((responseJson) => {
return responseJson.data.id;
})
.catch((error) => {
console.error(error);
});
}
//LinkedIn ID
function linkedinID() {
return fetch('https://api.linkedin.com/v1/people/~?format=json&oauth2_access_token='+queryParams.code)
.then((response) => response.json())
.then((responseJson) => {
return responseJson.id;
})
.catch((error) => {
console.error(error);
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment