From c28af61873b71b5de2d1cdd4ebb64cd3ec535960 Mon Sep 17 00:00:00 2001 From: Michael Date: Sun, 21 Jan 2024 21:24:08 +0000 Subject: [PATCH] Twitter: Fix error after posting --- twitter/twitter.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/twitter/twitter.php b/twitter/twitter.php index 8c906daf..b01345b7 100644 --- a/twitter/twitter.php +++ b/twitter/twitter.php @@ -362,7 +362,7 @@ function twitter_post(int $uid, string $url, string $type, array $data): stdClas ]); $response = $client->post($url, ['auth' => 'oauth', $type => $data]); - $body = $response->getBodyString()->getContents(); + $body = $response->getBody()->getContents(); $status = [ 'code' => $response->getStatusCode(), @@ -399,7 +399,7 @@ function twitter_test_connection(int $uid) $status = [ 'code' => $response->getStatusCode(), 'reason' => $response->getReasonPhrase(), - 'content' => $response->getBodyString()->getContents() + 'content' => $response->getBody()->getContents() ]; DI::pConfig()->set(1, 'twitter', 'last_status', $status); Logger::info('Test successful', ['uid' => $uid]);