Overview
- Skill Key
- alphafactor/x-publisher
- Author
- alphafactor
- Source Repo
- openclaw/skills
- Version
- -
- Source Path
- skills/alphafactor/x-publisher
- Latest Commit SHA
- f90510bb6422d04eb96f579150ffd9f30176bf43
Publish tweets to X (Twitter) using the official Tweepy library. Supports text-only tweets, tweets with images or videos, and returns detailed publish results including tweet ID and URL. Requires X API credentials (API Key, API Secret, Access Token, Access Token Secret).
Stars
0
Installs
0
Status
ACTIVE
Visibility
PUBLIC
直接复制以下提示词,发送给你的 AI 助手即可完成安装。
请先检查是否已安装 SkillHub 商店,若未安装,请根据 https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/skillhub.md 安装 SkillHub 商店,然后安装 X-Publisher 技能。 若已安装,则直接安装 X-Publisher 技能。
# X (Twitter) 推文发布工具 使用官方 Tweepy 库发布推文,支持纯文本、图片、视频等多种媒体类型。 ## 功能特性 - 📝 **纯文本推文** - 快速发布文字内容 - 🖼️ **图片支持** - 支持 JPG、PNG、GIF、WebP 格式(最多4张) - 🎬 **视频支持** - 支持 MP4、MOV、AVI、WebM 格式 - 📊 **返回结果** - 返回推文 ID、链接、发布时间等详细信息 - ✅ **认证验证** - 支持验证 API 凭证是否有效 ## 前提条件 ### 1. 安装依赖 ```bash pip3 install tweepy --user ``` ### 2. 获取 X API 凭证 1. 访问 https://developer.twitter.com/en/portal/dashboard 2. 创建项目并生成 API 密钥 3. 获取以下凭证: - API Key - API Secret - Access Token - Access Token Secret ### 3. 配置环境变量 ```bash # 添加到 ~/.zshrc export X_API_KEY="your-api-key" export X_API_SECRET="your-api-secret" export X_ACCESS_TOKEN="your-access-token" export X_ACCESS_TOKEN_SECRET="your-access-token-secret" export X_BEARER_TOKEN="your-bearer-token" # 可选 ``` 然后执行: ```bash source ~/.zshrc ``` ## 使用方法 ### 验证认证信息 首次使用前,建议先验证凭证: ```bash python3 scripts/x_publisher.py verify ``` 输出示例: ``` ✅ 认证成功! 👤 用户名: @your_username 📛 显示名: Your Name 👥 粉丝: 1,234 📝 推文: 5,678 ``` ### 发布纯文本推文 ```bash python3 scripts/x_publisher.py tweet "Hello, X! This is my first tweet." ``` ### 发布带图片的推文 ```bash # 单张图片 python3 scripts/x_publisher.py tweet "Check out this photo!" --media /path/to/image.jpg # 多张图片(最多4张) python3 scripts/x_publisher.py tweet "My photo collection:" \ --media /path/to/photo1.jpg \ --media /path/to/photo2.png \ --media /path/to/photo3.gif ``` ### 发布带视频的推文 ```bash python3 scripts/x_publisher.py tweet "Watch this video!" --media /path/to/video.mp4 ``` ## 输出结果 发布成功后会返回: ``` ============================================================ ✅ 推文发布成功! ============================================================ 📝 推文 ID: 1234567890123456789 🔗 链接: https://twitter.com/user/status/1234567890123456789 ⏰ 发布时间: 2024-02-03T15:...
capt-marbles
Task Router
capncoconut
Register, communicate, and earn on the x402hub AI agent marketplace. Use when an agent needs to register on x402hub, browse or claim bounties, submit deliverables, send messages to other agents via x402 Relay, check marketplace stats, or manage agent credentials. Triggers on x402hub, agent marketplace, bounty, relay messaging, agent-to-agent communication, or USDC earning.
capevace
Real-time event bus for AI agents. Publish, subscribe, and share live signals across a network of agents with Unix-style simplicity.
captchasco
OpenClaw integration guidance for CAPTCHAS Agent API, including OpenResponses tool schemas and plugin tool registration.
carol-gutianle
name: modelready description: Start using a local or Hugging Face model instantly, directly from chat. metadata: {"openclaw":{"requires":{"bins": "bash", "curl" }, "env": "URL" }}
canbirlik
Controls Wiz smart bulbs (turn on/off, RGB colors, disco mode) via local WiFi.