Communitygithub.com

publora/tiktok-post

透過 Publora 上傳或排程 TikTok 影片,支援隱私、留言、合拍、Stitch 及商業內容揭露設定。

tiktok-post 是什麼?

此技能讓 AI 代理程式能透過 Publora MCP 伺服器直接將影片上傳或排程至 TikTok,並完整控制隱私權、互動設定(留言、合拍、Stitch)與商業內容揭露。影片長度限制為 3 秒至 10 分鐘,最低幀率 23 FPS;圖片輪播最多可包含 35 張圖片。未經 TikTok 審核的應用程式僅能發布私人影片。支援多種平台,包括 Claude Code、Claude Desktop、Cursor、Codex 及 OpenClaw,可透過 MCP 協定或 REST API 操作。主要工具包含 `create_post`、`get_upload_url`、`complete_media` 與 `list_connections`,能處理從草稿建立、媒體上傳到最終排程的完整工作流程。

相容平台✓Claude Code✓Codex CLI✓Cursor
npx skills add https://github.com/publora/skills/tree/main/skills/tiktok-post

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

TikTok 貼文

使用 Publora MCP 伺服器將影片上傳並排程至 TikTok。支援隱私控制、互動設定(留言、合拍、Stitch)及商業內容揭露。

先決條件

方案: 適用於免費的 Starter 方案。目前限制與定價請見:publora.com/pricing。

開始使用

  1. 建立帳戶:publora.com/register(免費)
  2. 連接 TikTok:在 Publora Dashboard 透過 OAuth 連接
  3. 取得 API 金鑰:app.publora.com/dashboard/api
  4. 將您的代理程式連接到 MCP 伺服器,伺服器位址為 https://mcp.publora.com,使用 Authorization: Bearer sk_YOUR_API_KEY 進行驗證。在 Claude Code 中:
claude mcp add publora --transport http https://mcp.publora.com \
  --header "Authorization: Bearer sk_YOUR_API_KEY"

Claude Desktop、Cursor、Codex、OpenClaw 及 claude.ai 連接器各有不同的設定檔或流程:請參閱客戶端設定以取得確切路徑與程式碼片段。

REST API 備援方案

如果 MCP 伺服器無法使用或傳回錯誤,請直接使用 REST API:

基礎網址: https://api.publora.com/api/v1

驗證方式: 使用 x-publora-key 標頭(非 Authorization: Bearer):

# 取得您已連接的平台
curl -X GET "https://api.publora.com/api/v1/platform-connections" \
  -H "x-publora-key: sk_your_api_key"

# 建立貼文
curl -X POST "https://api.publora.com/api/v1/create-post" \
  -H "x-publora-key: sk_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "platforms": ["tiktok-99887766"],
    "content": "影片說明文字在此 #hashtag",
    "scheduledTime": "2026-03-25T10:00:00Z",
    "platformSettings": {
      "tiktok": {
        "viewerSetting": "PUBLIC_TO_EVERYONE",
        "allowComments": true
      }
    }
  }'

平台 ID 格式: tiktok-{id},其中 {id} 來自 /platform-connections 的回應。

範例 ID:tiktok-99887766、tiktok-123456789

📖 完整 API 文件: docs.publora.com

平台限制(API 與原生應用程式差異)

與原生 TikTok 應用程式不同的關鍵 API 限制:

影片需求

規格API 限制原生應用程式
最大長度10 分鐘60 分鐘
最小長度3 秒3 秒
最大檔案大小4 GB4 GB
最小幀率23 FPS23 FPS
格式MP4、MOV、WebMMP4、MOV、WebM

說明文字限制

元素API 限制原生應用程式
說明文字長度2,200 個字元4,000 個字元
Hashtag計入說明文字長度計入說明文字長度

速率限制

限制數值
每日貼文數15-20
每分鐘影片數最多 2 個

可用工具

create_post

建立新的 TikTok 貼文。

參數:

  • platforms:包含您的 TikTok 連接 ID 的陣列(例如 ["tiktok-99887766"])
  • content:影片說明文字(最多 2,200 個字元)
  • scheduledTime:ISO 8601 UTC 日期時間。非必要:省略則貼文會建立為草稿。傳送未來時間則會排程。若時間為過去五分鐘或更早,將會被拒絕並傳回 SCHEDULED_TIME_IN_PAST;若要立即發布,請使用當前時間加一分鐘。
  • mediaUrls:最多 10 個公開的 https 圖片或影片網址。Publora 會在伺服器端下載並在驗證之前附加它們,因此媒體和排程可在一次呼叫中完成。這是建立草稿後再使用 get_upload_url 然後 complete_media 流程的一次性替代方案。媒體攝取速率限制為每小時 60 個網址。

get_upload_url

取得用於影片上傳的預先簽署網址。

參數:

  • postGroupId:要附加影片的貼文 ID
  • fileName:影片檔案名稱(例如 "video.mp4")
  • contentType:video/mp4、video/quicktime 或 video/webm
  • type:"video"

complete_media

在預先簽署的 PUT 成功後,完成透過 get_upload_url 上傳的檔案。非必要,因為排程也會完成待處理的媒體,但提早呼叫可以在發布前先顯示格式和探測錯誤。使用 mediaUrls 附加媒體時不需要此步驟。

參數:

  • mediaId:get_upload_url 傳回的 ID

list_connections

列出您已連接的帳戶及其平台 ID。請先呼叫此工具,並逐字複製 IDs;這些 ID 無法猜測。

list_posts / get_post / update_post / delete_post

管理已排程和草稿貼文。update_post 也可以修補草稿或排程貼文的 content 和 platforms,因此修正錯字或重新指定目標不再需要刪除後重新建立。delete_media 和 prune_media_reference 可清理已上傳的檔案。

平台設定(透過 REST API)

TikTok 有 7 個透過 platformSettings 控制的平台特定設定:

{
  "platformSettings": {
    "tiktok": {
      "viewerSetting": "PUBLIC_TO_EVERYONE",
      "allowComments": true,
      "allowDuet": false,
      "allowStitch": false,
      "commercialContent": false,
      "brandOrganic": false,
      "brandedContent": false
    }
  }
}

觀看者設定(必要)

值說明
PUBLIC_TO_EVERYONE所有人都可觀看(預設)
MUTUAL_FOLLOW_FRIENDS僅互相追蹤的好友
FOLLOWER_OF_CREATOR僅您的跟隨者
SELF_ONLY僅您自己(類似草稿)

互動設定

設定預設值說明
allowCommentstrue是否允許觀看者留言
allowDuetfalse是否允許觀看者建立合拍
allowStitchfalse是否允許觀看者進行 Stitch

商業內容設定

設定預設值說明
commercialContentfalse這是商業內容嗎?
brandOrganicfalse自有品牌推廣
brandedContentfalse付費合作/贊助

注意: 如果 commercialContent 為 true,則 brandOrganic 或 brandedContent 至少必須有一個也為 true。

注意:platformSettings 可同時被 MCP 的 create_post 和 update_post 工具以及 REST API 接受。其 schema 是嚴格的:拼錯的平台或金鑰會因驗證錯誤而被拒絕,而非默默忽略。

關鍵限制

1. 未經審核的應用程式 = 僅限私人

關鍵: 如果您的 TikTok 應用程式尚未通過 TikTok 的審核程序,您只能發布私人影片(SELF_ONLY)。所有其他 viewerSetting 值都將被覆寫為 SELF_ONLY。

若要發布公開影片,您的應用程式必須通過 TikTok 審核。

2. 需要媒體:影片或圖片輪播

TikTok 不支援純文字貼文:每則貼文都需要媒體。

它接受圖片輪播:最多 35 張圖片,JPEG、PNG 或 WebP 格式,每張 20 MB。一則貼文只能是輪播或單一影片,不能同時包含兩者。

3. 最低 23 FPS

低於每秒 23 幀的影片將被 TikTok 拒絕。

範例

基本影片貼文

將此影片發布到 TikTok:
"我們如何在 60 秒內建立我們的新創公司 #startup #tech #coding"

私人草稿(測試)

將此影片以私人草稿形式上傳至 TikTok(只有我能看到):
"測試新內容格式"

在公開前使用 viewerSetting: "SELF_ONLY" 進行測試。

品牌內容

將此贊助影片發布到 TikTok,並附上適當的揭露資訊:
"超喜歡 @brand 的這個新產品! #ad #sponsored"

對於付費合作,請設定 commercialContent: true 和 brandedContent: true。

排程貼文

將此 TikTok 影片排程在明天下午 6 點發布:
"週末氛圍來襲! #weekend #fun"

支援的影片格式

格式建議備註
MP4是最可靠
MOV是Apple 格式
WebM是網路格式
AVIPublora 接受TikTok 可能拒絕
MKVPublora 接受TikTok 可能拒絕

建議: 使用 MP4 以獲得最佳相容性。

最佳做法

內容

  1. 前 3 秒抓住注意力:立即吸引觀眾
  2. 最佳長度:15-60 秒以獲得最佳互動
  3. 流行音效:盡可能使用熱門音訊
  4. Hashtag 策略:3-5 個相關 Hashtag

技術

  1. 垂直影片:9:16 比例表現最佳
  2. 高畫質:至少 720p 解析度
  3. 23+ FPS:確保流暢播放
  4. MP4 格式:最可靠的格式

時機

  • 最佳時段:目標時區的早上 7-9 點、中午 12-3 點、晚上 7-11 點
  • 發文頻率:每天 1-3 篇以利成長
  • 一致性:規律的發文排程有助於演算法

疑難排解

錯誤原因解決方案
unaudited_client_can_only_post_to_private_accounts應用程式未經核准提交應用程式進行 TikTok 審核,或使用 SELF_ONLY
spam_risk_too_many_posts已達每日限制等待 24 小時
duration_check_failed影片過長/過短確保長度在 3 秒到 10 分鐘之間
file_format_check_failed錯誤的影片格式使用 MP4、MOV 或 WebM
"23 FPS required"幀率過低將影片重新編碼為 23+ FPS
"TikTok requires selecting who can view"缺少 viewerSetting務必在 platformSettings 中包含 viewerSetting

Individual skills in this repo

This repo contains 8 individual skills — each has its own dedicated page.

publora/bluesky-post

Use when the user wants to post or schedule to Bluesky through Publora. Handles the 300-character cap, auto-detected hashtags and links, up to 4 images, and videos. Alt text cannot be set through the API. Needs a Bluesky app password, never the main password. Not for Mastodon (use social-post).

publora/instagram-post

Use when the user wants to post or schedule to Instagram through Publora: a single image, a 2-10 image carousel, a Reel or a Story. Requires a Business account and an image or video; text-only posts are rejected by the API. Not for Threads (use threads-post).

publora/linkedin-analytics

Analyze LinkedIn performance and manage engagement through Publora. Use when the user asks how a LinkedIn post or account performed (impressions, reach, reactions, comments, reshares, follower growth) or wants to react, comment, reshare or resolve an @mention. Statistics run over the REST API, engagement over MCP tools. Not for creating posts (use linkedin-post).

publora/linkedin-post

Use when the user wants to publish or schedule a LinkedIn post through Publora: text, a multi-image grid, a video, a PDF document, or @mentions. Not for analytics, reactions, comments or reshares (use linkedin-analytics), and not for other platforms.

publora/social-post

Use when the user wants to post or schedule to YouTube, a Facebook Page or Mastodon through Publora. YouTube needs a video on every post, Facebook publishes to Pages only, Mastodon caps at 500 characters. Not for the platforms that have their own skill.

publora/telegram-post

Use when the user wants to post or schedule to a Telegram channel or group through Publora, using a bot. Covers Telegram markdown, silent delivery, link previews and forward protection. Bot API caps media captions at 1,024 characters and videos at 50 MB. Not for other platforms (each has its own skill).

publora/threads-post

Create and schedule Threads posts with image carousels and reply control via Publora MCP. Use when the user wants to post to Meta's Threads. Multi-part threading is currently disabled by the platform, so long content stays a single post. Not for Instagram (use instagram-post) or X threads (use x-post).

publora/x-post

Use when the user wants to post or schedule to X (Twitter) through Publora, including threads auto-split past 280 characters, up to 4 images, or a video up to 140 seconds. X needs a paid Publora plan. Not for Threads or Bluesky (each has its own skill).

相關技能