vor dem Login
static platform\twitch::getAuthorizationUrl ([$bool $forceVerify = false[, $string $state = null]])
$forceVerify |
optional; gibt mit true an, dass eine Identifizierung erzwungen wird |
$state |
optional; gibt ein individuellen Key an |
gibt eine URL als string zurück, wo man sich über Twitch identifizieren kann
echo '<a href=' .platform\twitch::getAuthorizationUrl(true) .'>Mit Twitch anmelden</a>' ;
nach dem Login - REDIRECT URL
static platform\twitch::getAuthorizationInfo ()
gibt ein array mit Informationen von Twitch zurück
['code' => #IDENTCODE , 'scope' => #SCOPE , 'state' => #INDIVIDUELLER KEY ] (dev.twitch.tv/docs/authentication/); im Fehlerfall wird null zurückgegeben
// URL Redirect Site
platform\twitch::getAuthorizationInfo() ;
static platform\twitch::getToken ()
gibt ein array mit Informationen (Token) von Twitch zurück
['access_token' => #TOKEN , 'expires_in' => #EXPIRE IN SEC , 'refresh_token' => #REFRESH TOKEN , 'scope' => #SCOPE , 'token_type' => 'bearer' ] (dev.twitch.tv/docs/authentication/, dev.twitch.tv/docs/authentication/refresh-tokens/); im Fehlerfall wird null zurückgegeben
// URL Redirect Site
platform\twitch::getToken() ;
static platform\twitch::getUserInfo ()
gibt ein array mit Informationen über den Nutzer von Twitch zurück (eMail, Bild, etc.); im Fehlerfall wird null zurückgegeben
// URL Redirect Site
platform\twitch::getUserInfo() ;