publer-post

TotalClaw 作者 totalclaw

通过 Publer API 将内容发布到社交媒体。在安排或发布帖子到 TikTok(轮播、视频)、Instagram、Facebook、Twitter/X 或任何 Publer 支持的平台时使用。处理媒体上传、帖子创建、调度和作业轮询。用于涉及“发布到 TikTok”、“安排发布”、“发布到社交媒体”或“上传到 Publer”的任何任务。

安装 / 下载方式

TotalClaw CLI推荐
totalclaw install totalclaw:totalclaw~imamark-publer
cURL直接下载,无需登录
curl -fsSL https://skills.taituai.com/api/skills/totalclaw%3Atotalclaw~imamark-publer/file -o imamark-publer.md
## 概述(中文)

通过 Publer API 将内容发布到社交媒体。在安排或发布帖子到 TikTok(轮播、视频)、Instagram、Facebook、Twitter/X 或任何 Publer 支持的平台时使用。处理媒体上传、帖子创建、调度和作业轮询。用于涉及“发布到 TikTok”、“安排发布”、“发布到社交媒体”或“上传到 Publer”的任何任务。

## 原文

# Publer Post

Post and schedule social media content via the Publer API.

## Prerequisites

**Python Dependencies:**
```bash
pip install -r requirements.txt
```

**Environment Variables** (store in TOOLS.md or set before running):
- `PUBLER_API_KEY` — API key from Publer (Business plan required)
- `PUBLER_WORKSPACE_ID` — Your workspace ID
- `PUBLER_TIKTOK_ACCOUNT_ID` — TikTok account ID (optional, get via `accounts` command)

## Script: `scripts/publer.py`

### List accounts
```bash
python3 scripts/publer.py accounts
```
Use this first to discover account IDs.

### Upload media
```bash
python3 scripts/publer.py upload slide_1.jpg slide_2.jpg slide_3.jpg
```
Returns media IDs (one per line as JSON). Collect these for the post command.

### Post TikTok carousel (immediate)
```bash
python3 scripts/publer.py post \
  --account-id $PUBLER_TIKTOK_ACCOUNT_ID \
  --type photo \
  --title "Post title (max 90 chars)" \
  --text "Caption with #hashtags" \
  --media-ids id1,id2,id3,id4,id5,id6,id7,id8
```

### Schedule TikTok carousel
```bash
python3 scripts/publer.py post \
  --account-id $PUBLER_TIKTOK_ACCOUNT_ID \
  --type photo \
  --title "Post title" \
  --text "Caption" \
  --media-ids id1,id2,id3 \
  --schedule "2025-06-01T09:00:00Z"
```

### Dry run (preview payload)
Add `--dry-run` to print the JSON payload without sending.

### Check job status
```bash
python3 scripts/publer.py job-status <job_id>
```

## Workflow: Post a TikTok Carousel

1. Upload all slide images → collect media IDs
2. Run `post` with `--type photo`, title, caption+hashtags, and comma-separated media IDs
3. Script polls job until complete — confirm success

## Options
- `--privacy`: PUBLIC_TO_EVERYONE (default), MUTUAL_FOLLOW_FRIENDS, FOLLOWER_OF_CREATOR, SELF_ONLY
- `--auto-music` / `--no-auto-music`: auto-add music to carousel (default: on)
- `--no-poll`: submit without waiting for completion

## API Reference
For full endpoint details, see [references/api.md](references/api.md).