Created
July 29, 2021 09:56
-
-
Save bibhuticoder/8a0b4869e9745f52654395efcdc729fb 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
// Invoke this function on button click or whatever other use case | |
function setupInsta(){ | |
let appId = "XXXXXXXXXXXXXX"; | |
let redUri = window.location.origin + "/insta"; | |
let url = `https://api.instagram.com/oauth/authorize?client_id=${appId}&redirect_uri=${redUri}&scope=user_profile,user_media&response_type=code`; | |
window.open(url, "_blank").focus(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment