social-media-publisher

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Social Media Publisher

社交媒体发布工具

Follow shared release-shell rules in:
  • postplus-shared
    release-shell rules
Use this skill when the user wants to operate social publishing through the PostPlus-managed Postiz workspace.
This skill is for:
  • guiding users through the invite-link channel onboarding flow
  • listing integrations available on the PostPlus Postiz workspace
  • preparing a local publish request draft
  • creating a Postiz draft or schedule only after explicit approval
  • promoting an existing Postiz draft into the queue only after a second approval
遵循
postplus-shared
发布shell规则:
  • postplus-shared
    发布shell规则
当用户希望通过PostPlus管理的Postiz工作区进行社交帖子发布操作时,使用本skill。
本skill适用于:
  • 引导用户完成邀请链接渠道的入驻流程
  • 列出PostPlus Postiz工作区可用的集成项
  • 准备本地发布请求草稿
  • 仅在获得明确批准后创建Postiz草稿或安排发布计划
  • 仅在获得二次批准后将现有Postiz草稿推进至发布队列

Ownership model

所有权模型

PostPlus holds one platform-owned Postiz org and API key. End users do not need their own Postiz accounts.
Channel onboarding uses the Postiz invite-link mechanism:
  1. the product calls
    GET /public/v1/social/{integration}
    with the PostPlus Postiz API key
  2. Postiz returns a social-platform OAuth URL (e.g. Instagram, TikTok) and stores a state → PostPlus org mapping in Redis for 1 hour
  3. the product delivers that URL to the end user (via UI or CLI)
  4. the user clicks the link and authorizes their social account on the platform's own OAuth consent screen — no Postiz registration required
  5. the resulting channel token lands in the PostPlus Postiz org
  6. the product labels the channel with the user's PostPlus account id via
    PUT /integrations/:id/customer-name
PostPlus拥有一个平台专属的Postiz组织和API密钥。 终端用户无需拥有自己的Postiz账户。
渠道入驻采用Postiz邀请链接机制:
  1. 产品调用
    GET /public/v1/social/{integration}
    接口,使用PostPlus的Postiz API密钥
  2. Postiz返回社交平台的OAuth URL(例如Instagram、TikTok),并在Redis中存储状态→PostPlus组织的映射,有效期1小时
  3. 产品将该URL交付给终端用户(通过UI或CLI)
  4. 用户点击链接,在平台自身的OAuth授权界面授权其社交账户——无需注册Postiz
  5. 生成的渠道令牌存入PostPlus的Postiz组织
  6. 产品通过
    PUT /integrations/:id/customer-name
    接口,用用户的PostPlus账户ID标记该渠道

Safe default

安全默认设置

create_post.mjs
defaults to preview mode.
Without
--execute
, it:
  • validates the local request
  • enforces the integration allowlist
  • writes a local preview envelope
  • emits an
    approvalRequest
  • does not call Postiz
Actual remote mutation requires:
  • --execute
  • --approval-file <approved.json>
  • a channel that has been onboarded via the invite-link flow above
Use
change_post_status.mjs
to move a real Postiz draft from
draft
to
schedule
after a second explicit approval.
create_post.mjs
默认处于预览模式。
未添加
--execute
参数时,它会:
  • 验证本地请求
  • 强制执行集成项白名单
  • 写入本地预览包
  • 发送
    approvalRequest
    (批准请求)
  • 不调用Postiz接口
实际远程修改需要满足:
  • 添加
    --execute
    参数
  • 添加
    --approval-file <approved.json>
    参数
  • 渠道已通过上述邀请链接流程完成入驻
在获得二次明确批准后,使用
change_post_status.mjs
将真实的Postiz草稿从
draft
(草稿)状态修改为
schedule
(待发布)状态。

Authentication

认证机制

Read
references/api-contract.md
.
Release workflow rules:
  • PostPlus backend holds the Postiz API key server-side; scripts never receive it directly
  • all Postiz API calls are proxied through the hosted capability bridge
  • do not ask users for Postiz credentials of any kind
阅读
references/api-contract.md
文档。
发布工作流规则:
  • PostPlus后端在服务器端存储Postiz API密钥;脚本不会直接获取该密钥
  • 所有Postiz API调用均通过托管的能力桥接服务代理
  • 切勿向用户索要任何形式的Postiz凭证

Default workflow

默认工作流

  1. User requests channel onboarding via the product UI or CLI.
  2. Product generates an invite link for the target platform.
  3. User authorizes their social account via the platform OAuth screen.
  4. Product labels the new channel integration with the user's account id.
  5. List integrations to confirm the exact integration id for the user's channel.
  6. Build the local request JSON.
  7. Run
    create_post.mjs
    without
    --execute
    to produce an approval artifact.
  8. After approval, re-run
    create_post.mjs --execute --approval-file ...
    .
  9. If the post should stay reviewable, keep it in
    draft
    .
  10. Only after a second approval, run
    change_post_status.mjs --status schedule
    to queue it for publishing.
  1. 用户通过产品UI或CLI请求渠道入驻。
  2. 产品为目标平台生成邀请链接。
  3. 用户通过平台OAuth界面授权其社交账户。
  4. 产品用用户的账户ID标记新的渠道集成项。
  5. 列出集成项,确认用户渠道的准确集成ID。
  6. 构建本地请求JSON文件。
  7. 不带
    --execute
    参数运行
    create_post.mjs
    ,生成批准工件。
  8. 获得批准后,重新运行
    create_post.mjs --execute --approval-file ...
  9. 如果帖子需要保留可审核状态,保持其为
    draft
    (草稿)状态。
  10. 仅在获得二次批准后,运行
    change_post_status.mjs --status schedule
    将其加入发布队列。

Main scripts

主要脚本

  • scripts/list_integrations.mjs
  • scripts/integration_settings.mjs
  • scripts/trigger_tool.mjs
  • scripts/upload_media_from_url.mjs
  • scripts/upload_file.mjs
  • scripts/create_post.mjs
  • scripts/change_post_status.mjs
  • scripts/list_posts.mjs
  • scripts/delete_post.mjs
  • scripts/delete_post_group.mjs
  • scripts/get_missing_content.mjs
  • scripts/update_release_id.mjs
  • scripts/platform_analytics.mjs
  • scripts/post_analytics.mjs
  • scripts/list_notifications.mjs
  • scripts/render_publish_report.mjs
  • scripts/list_integrations.mjs
  • scripts/integration_settings.mjs
  • scripts/trigger_tool.mjs
  • scripts/upload_media_from_url.mjs
  • scripts/upload_file.mjs
  • scripts/create_post.mjs
  • scripts/change_post_status.mjs
  • scripts/list_posts.mjs
  • scripts/delete_post.mjs
  • scripts/delete_post_group.mjs
  • scripts/get_missing_content.mjs
  • scripts/update_release_id.mjs
  • scripts/platform_analytics.mjs
  • scripts/post_analytics.mjs
  • scripts/list_notifications.mjs
  • scripts/render_publish_report.mjs

Command examples

命令示例

Prepare a publish request preview:
bash
node skills/50-publishing/social-media-publisher/scripts/create_post.mjs \
  --request "<request.json>" \
  --customer-config "<postiz.config.json>" \
  --output "<create-post.preview.json>"
Execute the approved create:
bash
node skills/50-publishing/social-media-publisher/scripts/create_post.mjs \
  --request "<request.json>" \
  --customer-config "<postiz.config.json>" \
  --output "<create-post.result.json>" \
  --execute \
  --approval-file "<approval.json>"
Promote a draft into the publish queue:
bash
node skills/50-publishing/social-media-publisher/scripts/change_post_status.mjs \
  --post-id "<post-id>" \
  --status schedule \
  --output "<status.result.json>" \
  --execute \
  --approval-file "<approval.json>"
准备发布请求预览:
bash
node skills/50-publishing/social-media-publisher/scripts/create_post.mjs \
  --request "<request.json>" \
  --customer-config "<postiz.config.json>" \
  --output "<create-post.preview.json>"
执行已批准的创建操作:
bash
node skills/50-publishing/social-media-publisher/scripts/create_post.mjs \
  --request "<request.json>" \
  --customer-config "<postiz.config.json>" \
  --output "<create-post.result.json>" \
  --execute \
  --approval-file "<approval.json>"
将草稿推进至发布队列:
bash
node skills/50-publishing/social-media-publisher/scripts/change_post_status.mjs \
  --post-id "<post-id>" \
  --status schedule \
  --output "<status.result.json>" \
  --execute \
  --approval-file "<approval.json>"