diff --git a/app/Services/Social/TikTokAnalytics.php b/app/Services/Social/TikTokAnalytics.php index b8400526..bed0e830 100644 --- a/app/Services/Social/TikTokAnalytics.php +++ b/app/Services/Social/TikTokAnalytics.php @@ -152,10 +152,7 @@ private function fetchVideoMetrics(): array private function getHttpClient(): PendingRequest { - return $this->socialHttp()->withToken($this->accessToken) - ->withHeaders([ - 'Content-Type' => 'application/json; charset=UTF-8', - ]); + return $this->socialHttp()->asJson()->withToken($this->accessToken); } private function refreshToken(SocialAccount $account): void diff --git a/app/Services/Social/TikTokPublisher.php b/app/Services/Social/TikTokPublisher.php index e3c1ccda..4cc72f9f 100644 --- a/app/Services/Social/TikTokPublisher.php +++ b/app/Services/Social/TikTokPublisher.php @@ -60,10 +60,7 @@ public function publish(PostPlatform $postPlatform): array private function getHttpClient(): PendingRequest { - return $this->socialHttp()->withToken($this->accessToken) - ->withHeaders([ - 'Content-Type' => 'application/json; charset=UTF-8', - ]); + return $this->socialHttp()->asJson()->withToken($this->accessToken); } private function queryCreatorInfo(): array