Created
April 24, 2017 19:45
-
-
Save the-vampiire/09bbad3c564d745da4b14310e00815dc to your computer and use it in GitHub Desktop.
Twitch JS SDK Authentication
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
// Document Ready (execute on page load completion) | |
$( function(){ | |
// Twitch JS SDK looks for authenticated login status | |
Twitch.init({clientId: 'YOUR CLIENT ID HERE'}, function(error, status) { | |
if (status.authenticated) { | |
// Already logged in, hide button | |
$('.twitch-connect').hide(); | |
// call logged in user conversion passing the OAuth Token | |
convert_username_OAuth(status.token); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment