Communitygithub.com

publora/tiktok-post

当用户希望通过 Publora 上传或安排 TikTok 视频时使用,支持隐私、评论、合拍、拼接和商业内容披露设置。视频时长 3 秒至 10 分钟,帧率不低于 23 FPS;轮播最多支持 35 张图片。未审核的应用只能发布私密视频。不适用于 Reels(请使用 instagram-post)。

tiktok-post 是什么?

此技能通过 Publora MCP 服务器实现 TikTok 视频的上传与定时发布。它全面支持隐私控制(公开、互关好友、仅粉丝、仅自己)、互动设置(评论、合拍、拼接)以及商业内容披露(品牌有机推广与付费合作)。该技能适用于 Claude Code、Cursor、Codex、OpenClaw 等主流 AI 代理平台,并提供 MCP 协议与 REST API 两种集成方式。其核心工作流程包括:通过 `create_post` 直接上传媒体或先使用 `get_upload_url` 获取预签名 URL 上传视频,再调用 `complete_media` 完成校验。请注意,TikTok 要求视频帧率不低于 23 FPS,时长在 3 秒到 10 分钟之间,并且未通过 TikTok 审核的应用只能发布仅自己可见的私密视频。此外,该技能还提供了 `list_posts`、`update_post` 等丰富的帖子管理能力,以及严格的平台设置校验,确保参数正确无误。

兼容平台✓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。支持隐私控制、互动设置(评论、合拍、拼接)和商业内容披露。

前提条件

套餐: 免费 Starter 套餐即可使用。当前限制和定价请访问 publora.com/pricing。

快速开始

  1. 在 publora.com/register 创建账号(免费)
  2. 在 Publora 仪表盘 通过 OAuth 连接 TikTok
  3. 在 app.publora.com/dashboard/api 获取 API 密钥
  4. 将你的 AI 代理连接到 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:

基础 URL: 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": "视频描述文字在这里 #话题标签",
    "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 vs 原生应用)

与 TikTok 原生应用相比,API 的关键限制:

视频要求

规格API 限制原生应用
最大时长10 分钟60 分钟
最小时长3 秒3 秒
最大文件大小4 GB4 GB
最低帧率23 FPS23 FPS
格式MP4、MOV、WebMMP4、MOV、WebM

描述文字限制

元素API 限制原生应用
描述文字长度2,200 字符4,000 字符
话题标签包含在描述文字计数内包含在描述文字计数内

频率限制

限制值
每天发帖数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 图片或视频 URL。Publora 会在服务器端下载并在校验之前附加它们,因此媒体和日程安排可通过一次调用完成。这是替代先创建草稿,再调用 get_upload_url 和 complete_media 流程的一次性方案。媒体摄入限制为每小时 60 个 URL。

get_upload_url

获取用于视频上传的预签名 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。首先调用此工具并直接复制 ID,这些 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观众是否可以拼接视频

商业内容设置

设置默认值描述
commercialContentfalse是否为商业内容?
brandOrganicfalse有机品牌推广
brandedContentfalse付费合作/赞助

注意: 如果 commercialContent 为 true,则 brandOrganic 或 brandedContent 中至少一个也必须为 true。

注意:platformSettings 可通过 MCP 的 create_post 和 update_post 工具以及 REST API 接收。该模式 是严格的:拼写错误的平台或键将被拒绝并返回验证错误,而不会静默丢弃。

关键限制

1. 未审核应用 = 仅限私密

关键: 如果你的 TikTok 应用尚未通过 TikTok 的审核流程,你 只能发布仅自己可见的私密视频(SELF_ONLY)。所有其他 viewerSetting 值将被覆盖为 SELF_ONLY。

要发布公开视频,你的应用必须通过 TikTok 审核。

2. 必须包含媒体,视频或图片轮播

TikTok 不支持纯文本帖子:每个帖子都需要媒体。

TikTok 也支持图片轮播:最多 35 张图片,格式为 JPEG、PNG 或 WebP,每张最大 20 MB。一个帖子只能是轮播或单个视频,不能两者同时存在。

3. 最低 23 FPS

低于 23 帧每秒的视频将被 TikTok 拒绝。

示例

基本视频帖子

将此视频发布到 TikTok:
"我们如何在 60 秒内建立了我们的创业公司 #创业 #科技 #编程"

私密草稿(测试)

将此视频作为私密草稿上传到 TikTok(仅我可见):
"测试新内容形式"

在公开发布前,使用 viewerSetting: "SELF_ONLY" 进行测试。

品牌内容

将此赞助视频发布到 TikTok,并附带适当的披露信息:
"喜欢 @brand 的这个新产品!#广告 #赞助"

对于付费合作,设置 commercialContent: true 和 brandedContent: true。

计划发布

将此 TikTok 视频安排在明天下午 6 点发布:
"周末氛围来袭!#周末 #快乐"

支持的视频格式

格式推荐备注
MP4是最可靠
MOV是Apple 格式
WebM是Web 格式
AVIPublora 接受可能被 TikTok 拒绝
MKVPublora 接受可能被 TikTok 拒绝

建议: 使用 MP4 以获得最佳兼容性。

最佳实践

内容

  1. 前三秒抓住眼球:立即吸引注意力
  2. 最佳时长:15-60 秒以获得最佳互动率
  3. 热门音效:尽量使用热门音频
  4. 话题标签策略:使用 3-5 个相关话题标签

技术

  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).

相关技能