Created
January 22, 2017 10:08
-
-
Save shamdasani/677cedb8dc5dd8266563c398890020ba to your computer and use it in GitHub Desktop.
This file contains 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
//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