Threads 發佈
了解如何連結 Threads 帳號,並在 Threads 平台發佈文字貼文、圖片、輪播、影片以及多則串文。
連結 Threads 帳號
前置需求
- 具備 Threads 帳號(Instagram/Meta 所推出)
- 已登入 Boring 控制台
連結步驟
- 在控制台按下 「Connect Threads」
- 如尚未登入 Threads,請先登入
- 授權 Boring 存取 Threads 帳號
- 授與以下權限:
threads_basic:帳號基本資訊threads_content_publish:發佈內容threads_manage_replies:建立與管理串文回覆(長篇串文必須)threads_manage_insights:存取成效分析threads_read_replies:讀取留言/回覆
- 點擊 「Authorize」
完成後,帳號會出現在「Authorized Accounts」列表,顯示:
- Threads 使用者名稱
- 個人頭像
- 平台標籤(Threads)
- 唯一帳號 ID(可透過「Copy ID」複製)
- 解除連結選項
權杖資訊
- 權杖類型:長期使用者權杖
- 初始權杖:1 小時(短期)
- 自動轉換:60 天(長期)
- 有效期限:授權起算 60 天
- 自動刷新:會在到期前 5 天自動刷新
注意:不同於 Instagram,Threads 權杖會自動續期,通常無需手動重新連結。
支援的內容類型
Threads 提供最豐富的內容型態:
| 類型 | 說明 | 媒體數量 | 文字格式 | 範例 |
|---|---|---|---|---|
| 文字 | 純文字貼文 | 0 | 字串 | 快速想法、更新 |
| 照片 | 單張圖片 | 1 | 字串 | 圖片 + Caption |
| 輪播 | 多張圖片 | 2-20 | 字串 | 圖片集、教學 |
| 影片 | 影片貼文 | 1 | 字串 | 短影音、剪輯 |
| 串文 | 多則長篇貼文 | 0-1 | 陣列 | 故事、長篇內容 |
亮點:Threads 是唯一同時支援:
- 純文字貼文(不需媒體)
- 最多 20 張圖片的輪播
- 多則串文(Thread)
發佈範例
1. 純文字貼文
{
"post": {
"accountId": "your-threads-account-id",
"content": {
"text": "Just launched our new feature! Check it out 🚀",
"mediaUrls": [],
"platform": "threads"
},
"target": {
"targetType": "threads"
}
}
}
效果:在 Threads 發佈一則純文字貼文。
文字限制:
- 最長 500 個字元
- 支援 emoji
- URL 會自動變成可點擊連結
- 支援 @mention
2. 單張照片貼文
{
"post": {
"accountId": "your-threads-account-id",
"content": {
"text": "Beautiful morning view 🌅",
"mediaUrls": ["https://example.com/morning.jpg"],
"platform": "threads"
},
"target": {
"targetType": "threads"
}
}
}
效果:附帶圖片與文字說明的貼文。
圖片規格:
- 格式:JPG、PNG、WEBP
- 最大檔案:8MB
- 長寬比:不限(建議 1:1)
- 最低解析度:320x320
3. 輪播貼文
{
"post": {
"accountId": "your-threads-account-id",
"content": {
"text": "Our journey in photos 📸",
"mediaUrls": [
"https://example.com/photo1.jpg",
"https://example.com/photo2.jpg",
"https://example.com/photo3.jpg",
"https://example.com/photo4.jpg",
"https://example.com/photo5.jpg"
],
"platform": "threads"
},
"target": {
"targetType": "threads"
}
}
}
效果:建立可左右滑動的輪播貼文。
輪播限制:
- 最少 2 張、最多 20 張
- 建議圖片使用一致的長寬比
- 支援格式:JPG、PNG、WEBP
4. 影片貼文
{
"post": {
"accountId": "your-threads-account-id",
"content": {
"text": "Behind the scenes 🎬",
"mediaUrls": ["https://example.com/video.mp4"],
"platform": "threads"
},
"target": {
"targetType": "threads"
}
}
}
效果:在 Threads 發佈影片。
影片規格:
- 格式:MP4、MOV
- 最大檔案:512MB
- 最長時間:5 分鐘
- 建議比例:9:16
提醒:影片會以非同步方式處理,可能需要數分鐘才會上線。
5. 多則串文(Long-Form Thread)
Threads 最強大功能!
{
"post": {
"accountId": "your-threads-account-id",
"content": {
"text": [
"Let me tell you a story about building our product 🧵",
"It all started with a simple idea: make social media publishing easier for developers.",
"We researched the pain points: token management, platform differences, complex APIs.",
"So we built Boring: one API to rule them all. Simple, secure, and reliable.",
"Today we're proud to support Facebook, Instagram, and Threads. More platforms coming soon!",
"Thank you for being part of our journey 🙏"
],
"mediaUrls": [],
"platform": "threads"
},
"target": {
"targetType": "threads"
}
}
}
效果:建立 6 則串連的帖子,每則為上一則的回覆。
串文限制:
text必須為字串陣列- 陣列中的每個字串會成為獨立貼文
- 貼文以回覆方式串起來
- 貼文數量受 API 速率限制
- 每則貼文最多 500 字元
注意:必須授予 threads_manage_replies 權限。
文字格式判斷
Boring 會依 text 欄位自動判斷內容型態:
| 文字格式 | 結果 |
|---|---|
"text": "字串" |
單一貼文(文字、照片、輪播或影片) |
"text": ["段落1", "段落2"] |
多則串文 |
範例:
# 單一貼文
{"text": "Hello world", "mediaUrls": []}
# 單一貼文 + 圖片
{"text": "Check this out", "mediaUrls": ["image.jpg"]}
# 輪播
{"text": "Photo series", "mediaUrls": ["img1.jpg", "img2.jpg"]}
# 多則串文(6 則)
{"text": ["Post 1", "Post 2", "Post 3", "Post 4", "Post 5", "Post 6"], "mediaUrls": []}
API 請求格式
Python 範例:多則串文
import requests
API_URL = "https://boring.aiagent-me.com/v2/posts"
API_KEY = "boring_xxxxxxxxxxxxx"
ACCOUNT_ID = "your-threads-account-id"
# 建立長篇串文
thread_content = [
"🚨 Product Launch Alert! 🚨",
"We're excited to announce Boring API v3.0 with Threads integration!",
"What's new:\n✅ Text-only posts\n✅ Carousels up to 20 images\n✅ Long-form threads\n✅ Auto token refresh",
"Why Threads?\n\nThreads is perfect for storytelling, updates, and engaging with your audience in a conversational way.",
"Getting started is easy:\n1. Sign in\n2. Connect Threads\n3. Generate API key\n4. Start publishing",
"Check out our docs at boring-doc.aiagent-me.com for examples and guides!",
"What would you like to see next? Reply and let us know! 💬"
]
post_data = {
"post": {
"accountId": ACCOUNT_ID,
"content": {
"text": thread_content, # 字串陣列 = 串文
"mediaUrls": [],
"platform": "threads"
},
"target": {
"targetType": "threads"
}
}
}
headers = {
"boring-api-key": API_KEY,
"Content-Type": "application/json"
}
response = requests.post(API_URL, headers=headers, json=post_data)
result = response.json()
if result["success"]:
print(f"Thread published! Main post ID: {result['data']['post_id']}")
print(f"Total posts: {result['data']['thread_count']}")
else:
print(f"Error: {result['message']}")
成功回應(串文)
{
"success": true,
"message": "Post published successfully",
"data": {
"post_id": "17885748657253466",
"post_type": "thread",
"platform": "threads",
"page_name": "your_username",
"thread_count": 7,
"post_ids": [
"17885748657253466",
"17885748657253467",
"17885748657253468",
"17885748657253469",
"17885748657253470",
"17885748657253471",
"17885748657253472"
],
"published_at": "2025-01-20T10:30:00Z"
}
}
媒體 URL 要求
與其他平台相同,媒體 URL 必須:
- 可公開存取
- 直接指向檔案
- 使用 HTTPS
- 回傳正確的 content-type
支援格式:
- 圖片:JPG、PNG、WEBP
- 影片:MP4、MOV
最佳實務
1. 串文規劃
規劃內容結構:
- 以吸引人的開頭(hook)開始
- 將複雜主題拆解成多則易懂段落
- 3-7 則貼文最能維持互動
- 最後加入行動呼籲(CTA)
範例結構:
thread = [
"🧵 Why [topic] matters (thread)", # Hook
"First, let's define [topic]...", # 背景
"The main problem is...", # 問題
"Here's how we solve it...", # 解法
"Real example: [case study]", # 範例
"Key takeaway: [summary]", # 重點整理
"What do you think? [CTA]" # 互動
]
2. 純文字貼文
適用於:
- 快速更新
- 新功能公告
- 與粉絲互動提問
- 分享心得或觀點
Tips:
- 盡量簡短(280 字以內效果更佳)
- 適度使用 emoji
- 提出問題增加互動
- 利用換行提升可讀性
3. 輪播貼文
Threads 支援 最多 20 張圖片!
適合用於:
- 步驟教學(10 步以上流程)
- 產品型錄
- 前後對照
- 活動照片回顧
- 每月精華整理
4. 影片內容
最佳實務:
- 影片長度控制在 2 分鐘內
- 優先使用垂直格式(9:16)
- 加上字幕提升可及性
- 優化行動載具的觀看體驗
5. 互動經營
Threads 著重對話與互動:
- 及時回覆留言
- 在貼文中提出問題
- 充分運用 @mention
- 互相連結先前的 Threads 串文
疑難排解
常見錯誤
錯誤:「Invalid text format for thread」
- 原因:
text為陣列但包含非字串或空值 - 解法:確保陣列中的每個項目都是非空字串
錯誤:「Missing threads_manage_replies permission」
- 原因:未授權必要權限卻發佈串文
- 解法:重新連結 Threads 帳號並授予所有權限
錯誤:「Token expired」
- 原因:60 天權杖過期(自動刷新失敗)
- 解法:回控制台重新連結帳號
錯誤:「Carousel size exceeds limit」
- 原因:輪播圖片超過 20 張
- 解法:減少至 20 張以內
錯誤:「Text exceeds maximum length」
- 原因:單則文字超過 500 字元
- 解法:拆分成多則貼文(使用陣列格式)
發佈延遲
Threads 的處理時間可能稍長:
- 純文字:幾乎即時
- 照片:1-5 秒
- 輪播:5-15 秒
- 影片:30 秒至 3 分鐘
- 多則串文:每則約 10-30 秒
API 會自動處理重試與等待。
進階功能
動態產生串文
針對長文自動切割為多則 Threads 貼文:
def split_into_thread(long_text, max_chars=450):
"""將長文拆成多則串文貼文"""
sentences = long_text.split('. ')
posts = []
current_post = ""
for sentence in sentences:
if len(current_post) + len(sentence) < max_chars:
current_post += sentence + '. '
else:
posts.append(current_post.strip())
current_post = sentence + '. '
if current_post:
posts.append(current_post.strip())
return posts
# 使用方式
article = "Your very long article text here..."
thread_posts = split_into_thread(article)
post_data = {
"post": {
"accountId": ACCOUNT_ID,
"content": {
"text": thread_posts, # 自動變成串文
"mediaUrls": [],
"platform": "threads"
},
"target": {"targetType": "threads"}
}
}
串文附圖
在串文的第一則貼文附上圖片:
post_data = {
"post": {
"accountId": ACCOUNT_ID,
"content": {
"text": [
"Here's our announcement 🎉",
"This feature has been requested by many users.",
"We're rolling it out today!"
],
"mediaUrls": ["https://example.com/announcement.jpg"], # 只有第一則有圖片
"platform": "threads"
},
"target": {"targetType": "threads"}
}
}
注意:目前只有串文第一則可以附加媒體。
跨平台內容調整
從其他平台轉換內容至 Threads:
def adapt_for_threads(content):
text = content['text']
# 文字過長時拆成串文
if len(text) > 450:
return {
"text": split_into_thread(text),
"mediaUrls": content['mediaUrls'][:1], # 僅保留第一張圖片
"platform": "threads"
}
else:
return {
"text": text,
"mediaUrls": content['mediaUrls'][:20], # 最多 20 張圖片
"platform": "threads"
}
速率限制
Threads API 速率限制:
- 每位使用者:每小時 250 次呼叫
- 每個應用程式:每小時 5000 次呼叫
串文提醒:串文中的每一則貼文都算一次 API 呼叫。
發佈歷史
在控制台檢視 Threads 貼文:
- 登入 Boring 控制台
- 捲動到 「Recent Posts」 區塊
- 篩選平台為 Threads
若為串文會顯示:
- 貼文類型:
thread - 串文貼文數
- 全部貼文 ID
- 主貼文預覽
功能比較
| 功能 | Threads | ||
|---|---|---|---|
| 純文字貼文 | ✅ | ❌ | ✅ |
| 單張照片 | ✅ | ✅ | ✅ |
| 輪播 | ✅ (2-10) | ✅ (2-10) | ✅ (2-20) |
| 影片 | ✅ | ✅ (Reels) | ✅ |
| 長篇串文 | ❌ | ❌ | ✅ |
| 文字長度 | 無限制 | 2,200 | 500/貼文 |
| 權杖到期 | 永不過期 | 60 天 | 60 天 |
| 自動刷新 | N/A | ❌ | ✅ |
下一步
- Facebook 發佈:探索 Facebook 功能
- Instagram 發佈:了解 Instagram 最佳實務
- API 參考:完整 API 文件
- 使用情境範例:查看實際應用案例