From 9e27e3061ca839e4a0af08fd7447e6a3511113ce Mon Sep 17 00:00:00 2001 From: Benjamin Lorteau Date: Wed, 11 Dec 2019 13:19:32 -0500 Subject: [PATCH] [tumblr] Use correct object class for Oauth token in library/tumblroauth - Addresses https://github.com/friendica/friendica/issues/7675#issuecomment-564648263 --- tumblr/library/tumblroauth.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tumblr/library/tumblroauth.php b/tumblr/library/tumblroauth.php index 904855ff..782c6b4b 100644 --- a/tumblr/library/tumblroauth.php +++ b/tumblr/library/tumblroauth.php @@ -76,7 +76,7 @@ class TumblrOAuth $this->sha1_method = new OAuthSignatureMethod_HMAC_SHA1(); $this->consumer = new OAuthConsumer($consumer_key, $consumer_secret); if (!empty($oauth_token) && !empty($oauth_token_secret)) { - $this->token = new OAuthConsumer($oauth_token, $oauth_token_secret); + $this->token = new OAuthToken($oauth_token, $oauth_token_secret); } else { $this->token = null; } @@ -97,7 +97,7 @@ class TumblrOAuth $request = $this->oAuthRequest($this->requestTokenURL(), 'GET', $parameters); $token = OAuthUtil::parse_parameters($request); - $this->token = new OAuthConsumer($token['oauth_token'], $token['oauth_token_secret']); + $this->token = new OAuthToken($token['oauth_token'], $token['oauth_token_secret']); return $token; } @@ -140,7 +140,7 @@ class TumblrOAuth $request = $this->oAuthRequest($this->accessTokenURL(), 'GET', $parameters); $token = OAuthUtil::parse_parameters($request); - $this->token = new OAuthConsumer($token['oauth_token'], $token['oauth_token_secret']); + $this->token = new OAuthToken($token['oauth_token'], $token['oauth_token_secret']); return $token; } @@ -164,7 +164,7 @@ class TumblrOAuth $parameters['x_auth_mode'] = 'client_auth'; $request = $this->oAuthRequest($this->accessTokenURL(), 'POST', $parameters); $token = OAuthUtil::parse_parameters($request); - $this->token = new OAuthConsumer($token['oauth_token'], $token['oauth_token_secret']); + $this->token = new OAuthToken($token['oauth_token'], $token['oauth_token_secret']); return $token; } @@ -247,7 +247,6 @@ class TumblrOAuth /** * Make an HTTP request * - * * @param string $url * @param string $method * @param mixed $postfields -- 2.39.5