Skip to content

Open-source social media scheduler built for AI agents and the teams behind them. Create, schedule and publish posts to every network through MCP or the REST API, or write them yourself in a composer your team will love.

fix: use asJson() on TikTok HTTP client to send proper JSON body

Paulo Castellano326648d4f993
diff --git a/app/Services/Social/TikTokAnalytics.php b/app/Services/Social/TikTokAnalytics.php
index b84005267..bed0e8303 100644
--- a/app/Services/Social/TikTokAnalytics.php
+++ b/app/Services/Social/TikTokAnalytics.php
@@ -152,10 +152,7 @@ class TikTokAnalytics
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 e3c1ccda6..4cc72f9f7 100644
--- a/app/Services/Social/TikTokPublisher.php
+++ b/app/Services/Social/TikTokPublisher.php
@@ -60,10 +60,7 @@ class TikTokPublisher
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