平台與限制

取得 API 金鑰

每個網絡都有自己的規則。與其寫死在程式碼中,不如從 GET /v1/platforms 讀取:文字最大長度、主題標籤和標註的上限、接受的媒體、格式,以及該網絡是否對你開放。

json
{
  "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" }
      ]
    }
  ]
}
網絡文字媒體格式
Instagram2,200 個字元,30 個主題標籤,20 個標註必填,最多 10 個(JPEG、MP4、MOV)post, reel, story, carousel
Facebook63,206 個字元最多 10 個,相片或影片post, reel, story, video
TikTok2,200 個字元必填:一部影片,或最多 35 張相片video, photo
LinkedIn3,000 個字元最多 20 個post, article, carousel, video
X280 個字元,串文最多 25 則帖文最多 4 個,相片或一部影片post, thread

這些數字是目前的資料;GET /v1/platforms 始終給出最新資料。

試跑會在你發布之前套用同樣的規則。