public function getAccessToken($code, $state = null)
    {
        $response = $this->getAccessObject($code, $state);

        return $response['access_token'];
    }
public function getAccessToken($code, $state = null)
    {
        $response = $this->getAccessObject($code, $state);

        return $response['access_token'];
    }
public function getAccessToken ( $ code , $ state = null ) { $ response = $ this -> getAccessObject ( $ code , $ state ) ; return $ response [ 'access_token' ] ; }
Get access_token from Twitch.

@deprecated Use getAccessObject() instead

@param string $code  code from redirect_uri
@param string $state optional state OAuth2 parameter to prevent cross-site scripting attacks

@return JSON JSON response object containing the access token
Get access_token from Twitch .