Created
August 2, 2018 14:14
-
-
Save rdlh/bb556cf80a5cdcf457079c30055f0fea to your computer and use it in GitHub Desktop.
HD Instagram Profile Picture
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
function fetchInstagramId(callback) { | |
fetch('https://i.instagram.com/api/v1/users/' + window._sharedData.entry_data.ProfilePage[0].graphql.user.id + '/info/') | |
.then(response => response.json()) | |
.then(json => callback(json)) | |
.catch(error => callback(error, null)) | |
} | |
function fetchHdProfilePicture() { | |
fetchInstagramId(function(data) { | |
window.open(data.user.hd_profile_pic_url_info.url) | |
}) | |
} | |
fetchHdProfilePicture() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment