publora-twitter
使用 Publora API 将内容发布或安排到 X (Twitter)。使用这个技能 当用户想要发推文、安排推文或将话题发布到 X/Twitter 时 通过普布洛拉。
安装 / 下载方式
TotalClaw CLI推荐
totalclaw install totalclaw:totalclaw~sergebulaev-publora-twittercURL直接下载,无需登录
curl -fsSL https://skills.taituai.com/api/skills/totalclaw%3Atotalclaw~sergebulaev-publora-twitter/file -o sergebulaev-publora-twitter.md# Publora — X / Twitter
X/Twitter platform skill for the Publora API. For auth, core scheduling, media upload, and workspace/webhook docs, see the `publora` core skill.
**Base URL:** `https://api.publora.com/api/v1`
**Header:** `x-publora-key: sk_YOUR_KEY`
**Platform ID format:** `twitter-{userId}`
> ⚠️ **Twitter/X requires Pro or Premium plan** — excluded from the Starter plan.
## Platform Limits (API)
> ⚠️ API limits differ from native app. Design against these.
| Property | API Limit | Notes |
|----------|-----------|-------|
| Text | **280 characters** | 25,000 with Premium account |
| Images | Up to **4** × 5 MB | All formats auto-converted to PNG (max 1000px width) |
| Video | **2 min (120s)** / 512 MB | ⚠️ Native allows 2:20 — API is stricter |
| Video format | MP4, MOV | — |
| Threading | ✅ Auto-split with `(1/N)` or manual `---` | See Threading section |
| Text only | ✅ Yes | — |
**Common errors:**
- `This user is not allowed to post a video longer than 2 minutes` — trim video to under 120s
## Character Counting
X has specific rules Publora handles automatically:
- **Standard characters** count as 1
- **Emojis** count as **2 characters**
- **URLs** are counted by their **literal length** — Publora does NOT apply Twitter's 23-character URL shortening rule
## Post a Tweet
```javascript
await fetch('https://api.publora.com/api/v1/create-post', {
method: 'POST',
headers: { 'Content-Type': 'application/json', 'x-publora-key': 'sk_YOUR_KEY' },
body: JSON.stringify({
content: 'Just shipped a new feature! 🚀 #buildinpublic',
platforms: ['twitter-123456789']
})
});
```
## Threading
### Auto-split (content > 280 chars)
Publora automatically splits at paragraph/sentence/word breaks and adds `(1/N)` markers (e.g., `(1/3)`, `(2/3)`). 10 characters reserved per tweet for the marker.
### Manual split with `---`
Use `---` on its own line to define exact split points:
```javascript
body: JSON.stringify({
content: '1/ Everything I learned building in public this year.\n\n---\n\n2/ First lesson: ship early. Don\'t wait for perfect.\n\n---\n\n3/ Second lesson: your audience is your best product team.',
platforms: ['twitter-123456789']
})
```
### Explicit markers `[n/m]`
Use `[1/3]`, `[2/3]` etc. — Publora detects these and splits at those points exactly (preserves as written).
### Media in threads
- Up to 4 images or 1 video attached to the **first tweet only**
- Subsequent tweets in thread are text-only
- Images and video cannot be mixed in the same tweet
## Schedule a Tweet
```javascript
body: JSON.stringify({
content: 'Scheduled announcement: our product launches tomorrow! 🎉',
platforms: ['twitter-123456789'],
scheduledTime: '2026-03-20T14:00:00.000Z'
})
```
## Platform Quirks
- **Pro/Premium required** — Twitter/X is excluded from the Starter plan
- **All images → PNG**: Publora auto-converts all image formats (JPEG, WebP, GIF, etc.) to PNG and resizes to max 1000px width before uploading
- **API video limit is 2 min** — not 2:20 like native app; videos over 120s will fail
- **Emojis count as 2 chars** — factor this into character counting
- **URLs use literal length** — Publora does NOT apply Twitter's 23-char shortening; a 40-char URL counts as 40
- **Premium accounts** get 25,000 character limit — Publora uses extended limit automatically
- **GIF posts** count as a video, not an image — different size/count rules apply
- **Media only on first tweet** when threading
---
## 中文说明
# Publora — X / Twitter
Publora API 的 X/Twitter 平台技能。关于鉴权、核心调度、媒体上传以及工作区/webhook 文档,请参阅 `publora` 核心技能。
**Base URL:** `https://api.publora.com/api/v1`
**Header:** `x-publora-key: sk_YOUR_KEY`
**Platform ID format:** `twitter-{userId}`
> ⚠️ **Twitter/X 需要 Pro 或 Premium 套餐** —— Starter 套餐不包含。
## 平台限制(API)
> ⚠️ API 限制与原生应用不同,请按这些限制来设计。
| 属性 | API 限制 | 备注 |
|----------|-----------|-------|
| 文本 | **280 个字符** | Premium 账户为 25,000 |
| 图片 | 最多 **4** 张 × 5 MB | 所有格式自动转换为 PNG(最大宽度 1000px) |
| 视频 | **2 分钟(120s)** / 512 MB | ⚠️ 原生应用允许 2:20 —— API 更严格 |
| 视频格式 | MP4, MOV | —— |
| 串推(Threading) | ✅ 通过 `(1/N)` 自动拆分或手动 `---` | 参见“串推”章节 |
| 纯文本 | ✅ 是 | —— |
**常见错误:**
- `This user is not allowed to post a video longer than 2 minutes` —— 将视频裁剪至 120s 以内
## 字符计数
X 有特定的规则,Publora 会自动处理:
- **标准字符** 计为 1
- **表情符号(Emoji)** 计为 **2 个字符**
- **URL** 按其 **字面长度** 计数 —— Publora 不会应用 Twitter 的 23 字符 URL 缩短规则
## 发布一条推文
```javascript
await fetch('https://api.publora.com/api/v1/create-post', {
method: 'POST',
headers: { 'Content-Type': 'application/json', 'x-publora-key': 'sk_YOUR_KEY' },
body: JSON.stringify({
content: 'Just shipped a new feature! 🚀 #buildinpublic',
platforms: ['twitter-123456789']
})
});
```
## 串推(Threading)
### 自动拆分(内容 > 280 字符)
Publora 会在段落/句子/单词的断点处自动拆分,并添加 `(1/N)` 标记(例如 `(1/3)`、`(2/3)`)。每条推文为标记保留 10 个字符。
### 使用 `---` 手动拆分
在单独一行使用 `---` 来定义精确的拆分点:
```javascript
body: JSON.stringify({
content: '1/ Everything I learned building in public this year.\n\n---\n\n2/ First lesson: ship early. Don\'t wait for perfect.\n\n---\n\n3/ Second lesson: your audience is your best product team.',
platforms: ['twitter-123456789']
})
```
### 显式标记 `[n/m]`
使用 `[1/3]`、`[2/3]` 等 —— Publora 会检测到这些标记并精确地在这些位置拆分(按原样保留)。
### 串推中的媒体
- 最多 4 张图片或 1 个视频,**仅附加到第一条推文**
- 串推中后续的推文为纯文本
- 同一条推文中不能混用图片和视频
## 安排一条推文
```javascript
body: JSON.stringify({
content: 'Scheduled announcement: our product launches tomorrow! 🎉',
platforms: ['twitter-123456789'],
scheduledTime: '2026-03-20T14:00:00.000Z'
})
```
## 平台特性(Quirks)
- **需要 Pro/Premium** —— Twitter/X 不包含在 Starter 套餐中
- **所有图片 → PNG**:Publora 在上传前会自动将所有图片格式(JPEG、WebP、GIF 等)转换为 PNG,并将尺寸调整为最大宽度 1000px
- **API 视频限制为 2 分钟** —— 不像原生应用的 2:20;超过 120s 的视频会失败
- **表情符号计为 2 个字符** —— 计数时需要考虑这一点
- **URL 按字面长度计数** —— Publora 不会应用 Twitter 的 23 字符缩短;一个 40 字符的 URL 计为 40
- **Premium 账户** 可获得 25,000 字符上限 —— Publora 会自动使用扩展上限
- **GIF 帖子** 算作视频而非图片 —— 适用不同的大小/数量规则
- 串推时 **媒体仅在第一条推文上**