返回顶部
b

buffer-publisherBuffer发布工具

Publish social media posts to LinkedIn and Twitter/X via Buffer GraphQL API. PRIMARY and ONLY tool for social publishing (Typefully cancelled 2026-03-25). Use when publishing posts to Nissan's social channels.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.1
安全检测
已通过
95
下载量
免费
免费
0
收藏
概述
安装方式
版本历史

buffer-publisher

最后使用时间: 2026-03-25
状态: 活跃 — LinkedIn 主要工具

Buffer 发布工具

何时使用 / 何时不使用

使用 Buffer 的场景:

  • - 在 LinkedIn(nissandookeran)或 Twitter/X(redditech)上发布帖子 — 立即发布或定时发布
  • 将帖子加入 Buffer 自动优化时段队列
  • 来自 Liv 或内容管道的任何社交发布任务

请勿使用 Buffer 的场景:

  • - Bluesky — 未连接,暂无可用工具
  • 内容草稿 — Buffer 负责发布,不负责起草。请先撰写内容,再调用此技能。
  • 阅读/分析 — Buffer GraphQL 可查询帖子,但超出本技能范围;请直接查看 Buffer 仪表盘
  • 除 LinkedIn 和 Twitter/X 之外的任何平台

唯一可用工具: Typefully 已于 2026-03-25 取消。Buffer 是唯一的社交发布平台,无备用方案。


凭证信息

  • - API 密钥:op://OpenClaw/Buffer API Credentials/credential
  • API 基础地址:https://api.buffer.com/graphql
  • 认证头:Authorization: Bearer

已连接频道
频道ID服务
nissandookeran69c29382af47dacb694d24b4LinkedIn
redditech
69c29939af47dacb694d3d1f | Twitter/X |


立即发布(shareNow)

python
import json, subprocess

BUFFER_KEY =
CHANNEL_ID = 69c29382af47dacb694d24b4 # LinkedIn

或 69c29939af47dacb694d3d1f # Twitter/X

payload = {
query: mutation CreatePost($input: CreatePostInput!) {
createPost(input: $input) {
... on PostActionSuccess { post { id status } }
}
},
variables: {
input: {
channelId: CHANNEL_ID,
text: 您的帖子内容在此,
schedulingType: automatic,
mode: shareNow
}
}
}

result = subprocess.run(
[curl, -s, -X, POST,
-H, fAuthorization: Bearer {BUFFER_KEY},
-H, Content-Type: application/json,
-d, json.dumps(payload),
https://api.buffer.com/graphql],
capture_output=True, text=True
)
d = json.loads(result.stdout)
post_id = d[data][createPost][post][id]
status = d[data][createPost][post][status]
print(f帖子 ID: {post_id}, 状态: {status})

status sent = 已立即发布




定时发布帖子

使用 mode: customScheduled + ISO8601 UTC 时间戳 dueAt。请勿使用 scheduledAt — Post 类型中不存在该字段。

python
import json, subprocess
from datetime import datetime, timezone

BUFFER_KEY =
CHANNEL_ID = 69c29382af47dacb694d24b4 # LinkedIn

设定为悉尼时间上午9点(AEDT UTC+11)= 前一天的 UTC 22:00

传递给 Buffer 前务必转换为 UTC

scheduled_utc = 2026-03-27T22:00:00Z # ISO8601 UTC — 必须包含 Z 后缀

payload = {
query: mutation CreatePost($input: CreatePostInput!) {
createPost(input: $input) {
... on PostActionSuccess { post { id status dueAt } }
}
},
variables: {
input: {
channelId: CHANNEL_ID,
text: 您的定时帖子内容在此,
schedulingType: automatic,
mode: customScheduled,
dueAt: scheduled_utc
}
}
}

result = subprocess.run(
[curl, -s, -X, POST,
-H, fAuthorization: Bearer {BUFFER_KEY},
-H, Content-Type: application/json,
-d, json.dumps(payload),
https://api.buffer.com/graphql],
capture_output=True, text=True
)
d = json.loads(result.stdout)
post = d[data][createPost][post]
print(f帖子 ID: {post[id]}, 状态: {post[status]}, 发布时间: {post[dueAt]})

status buffer = 已加入队列/已定时(尚未发送)




成功响应示例

成功的 createPost 响应体如下所示:

json
{
data: {
createPost: {
post: {
id: 67e3a1b2c4d5e6f7a8b9c0d1,
status: sent
}
}
}
}

  • - status: sent → 已立即发布(shareNow)
  • status: buffer → 已加入队列或已定时(将在 dueAt 时间发布)
  • 如果 data.createPost 为 null 或缺少 post,则变更操作静默失败 — 请检查顶层的 errors 数组

失败响应示例:
json
{
errors: [
{
message: Value \shareNOW\ does not exist in \SchedulingType\ enum.,
locations: [{line: 1, column: 42}]
}
],
data: null
}



关键 Schema 说明


  • - schedulingType 枚举值:automatic | notification(不是 now,也不是 shareNow)
  • mode 枚举值:addToQueue | shareNow | shareNext | customScheduled | recommendedTime
  • 立即发布使用 automatic + shareNow
  • 定时发布使用 automatic + customScheduled + dueAt
  • dueAt 字段接受 ISO8601 UTC 日期时间字符串(不是 scheduledAt — Post 类型中不存在该字段)
  • 响应类型为联合类型 — 务必使用 ... on PostActionSuccess 片段
  • Schema 中不存在 CoreApiError — 请省略错误片段或使用其他错误类型
  • CreatePostInput 中没有 draft 字段 — 请省略

获取已连接频道

bash curl -s -X POST \ -H Authorization: Bearer $BUFFER_KEY \ -H Content-Type: application/json \ -d {query: { account { id name email channels { id name service } } }} \ https://api.buffer.com/graphql

通过 Buffer 发布 Twitter/X 帖子串

Buffer 不支持原生帖子串编辑。请以单条更新形式发布,推文之间用 \n\n---\n\n 分隔。如果未来需要真正的帖子串功能,届时再评估替代工具。

路由规则
平台工具
LinkedInBuffer
Twitter/X
Buffer ✅ |

| Bluesky | 未连接 — 除非添加新工具,否则跳过 |

Typefully 已于 2026-03-25 取消。无备用方案 — Buffer 是唯一的社交发布工具。


常见错误

  1. 1. schedulingType 枚举值错误
- ❌ schedulingType: now → 枚举错误 - ❌ schedulingType: shareNow → 枚举错误(shareNow 是 mode 值,不是 schedulingType) - ✅ schedulingType: automatic(几乎总是您想要的)
  1. 2. 使用 scheduledAt 而非 dueAt
- ❌ scheduledAt: 2026-03-27T22:00:00Z → 字段不存在,静默忽略或报错 - ✅ dueAt: 2026-03-27T22:00:00Z
  1. 3. 忘记添加 Content-Type: application/json
- 返回 Unsupported Content-Type 错误 - 在 curl 调用中始终包含 -H Content-Type: application/json
  1. 4. 使用旧版 v1 API 基础地址

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 buffer-publisher-1775969361 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 buffer-publisher-1775969361 技能

通过命令行安装

skillhub install buffer-publisher-1775969361

下载

⬇ 下载 buffer-publisher v1.0.1(免费)

文件大小: 3.82 KB | 发布时间: 2026-4-13 09:35

v1.0.1 最新 2026-4-13 09:35
Security: added security_notes to clarify legitimate usage of network/credential/encoding patterns. Prevents false-positive scanner flags.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部