平台与限制
获取 API 密钥每个网络都有自己的规则。与其硬编码,不如从 GET /v1/platforms 读取:文本最大长度、话题标签和提及的上限、接受的媒体、格式,以及该网络是否对你开放。
{
"data": [
{
"platform": "instagram",
"name": "Instagram",
"available": true,
"caption": { "maxLength": 2200, "maxHashtags": 30, "maxMentions": 20, "enforced": true },
"media": { "maxCount": 10, "mixImagesAndVideo": true, "imageTypes": ["image/jpeg"], "videoTypes": ["video/mp4", "video/quicktime"] },
"formats": [
{ "format": "post", "default": true, "requiredMedia": "any" },
{ "format": "reel", "default": false, "requiredMedia": "video" }
]
}
]
}| 网络 | 文本 | 媒体 | 格式 |
|---|---|---|---|
| 2,200 个字符,30 个话题标签,20 个提及 | 必填,最多 10 个(JPEG、MP4、MOV) | post, reel, story, carousel | |
| 63,206 个字符 | 最多 10 个,照片或视频 | post, reel, story, video | |
| TikTok | 2,200 个字符 | 必填:一个视频,或最多 35 张照片 | video, photo |
| 3,000 个字符 | 最多 20 个 | post, article, carousel, video | |
| X | 280 个字符,串文最多 25 条帖子 | 最多 4 个,照片或一个视频 | post, thread |
这些数字是当前的数据;GET /v1/platforms 始终给出最新数据。
试运行会在你发布之前应用同样的规则。