Merge pull request 'Tumblr: Fixed token exchange' (#1468) from heluecht/friendica...
authorHypolite Petovan <hypolite@mrpetovan.com>
Tue, 27 Feb 2024 00:34:22 +0000 (01:34 +0100)
committerHypolite Petovan <hypolite@mrpetovan.com>
Tue, 27 Feb 2024 00:34:22 +0000 (01:34 +0100)
Reviewed-on: https://git.friendi.ca/friendica/friendica-addons/pulls/1468

tumblr/tumblr.php

index d6508ff..12e9e5e 100644 (file)
@@ -1479,7 +1479,7 @@ function tumblr_exchange_token(int $uid): stdClass
                ]);
 
                $response = $client->post('oauth2/exchange', ['auth' => 'oauth']);
-               return json_decode($response->getBodyString()->getContents());
+               return json_decode($response->getBody()->getContents());
        } catch (RequestException $exception) {
                Logger::notice('Exchange failed', ['code' => $exception->getCode(), 'message' => $exception->getMessage()]);
                return new stdClass;