← 返回
数据分析 Key

Storyclaw X Manager

Manage X (Twitter) accounts — post tweets, like, reply, retweet, view timeline, search, auto-interact, analyze data.
管理 X (Twitter) 账号,支持发布推文、点赞、回复、转发、查看时间线、搜索、自动互动及数据分析。
patches429
数据分析 clawhub v0.1.0 1 版本 100000 Key: 需要
★ 0
Stars
📥 574
下载
💾 10
安装
1
版本
#latest

概述

X Manager - Twitter/X Account Management

Manage X (formerly Twitter) accounts: posting, engagement, timeline, and analytics.

Multi-User Architecture

Each user's credentials are stored in credentials/{USER_ID}.json:

{
  "twitter": {
    "api_key": "",
    "api_secret": "",
    "access_token": "",
    "access_token_secret": "",
    "bearer_token": ""
  }
}

If user has no Twitter credentials configured, prompt them to bind their X account first.

Or set env vars: TWITTER_API_KEY, TWITTER_API_SECRET, TWITTER_ACCESS_TOKEN, TWITTER_ACCESS_TOKEN_SECRET, TWITTER_BEARER_TOKEN.

Supported Operations

1. Post Tweet

python3 {baseDir}/scripts/post_tweet.py <USER_ID> "<tweet content>" [--media <image_path>]

Max 280 characters. Longer tweets auto-split for Premium/Enterprise accounts.

2. Engagement

Like:

python3 {baseDir}/scripts/like_tweet.py <USER_ID> <tweet_id>

Reply:

python3 {baseDir}/scripts/reply_tweet.py <USER_ID> <tweet_id> "<reply content>"

Retweet:

python3 {baseDir}/scripts/retweet.py <USER_ID> <tweet_id>

3. Data Retrieval

User tweets:

python3 {baseDir}/scripts/get_user_tweets.py <USER_ID> <twitter_handle> [--count <n>]

Timeline:

python3 {baseDir}/scripts/get_timeline.py <USER_ID> [--count <n>]

Search:

python3 {baseDir}/scripts/search_tweets.py <USER_ID> "<keywords>" [--count <n>]

Auto-Interaction Workflow

Configure in state/{USER_ID}.json:

{
  "auto_reply": {
    "enabled": true,
    "keywords": ["keyword1", "keyword2"],
    "reply_template": "Thanks {username} for {keyword}!"
  }
}

Error Handling

  • API rate limit: prompt user to wait and retry
  • Auth failure: prompt user to rebind X account
  • Tweet too long: auto-split or prompt user to shorten

Twitter API Tiers

  • Free: read only, no posting
  • Premium ($100/month): post + analytics
  • Enterprise: higher limits

版本历史

共 1 个版本

  • v0.1.0 当前
    2026-03-19 21:50 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

content-creation

Giggle Generation Video

patches429
支持文字转视频和图像转视频(起始/结束帧)。适用于需要生成视频、制作短视频或将文字转换为视频的场景。
★ 2 📥 916
data-analysis

Excel / XLSX

ivangdavila
创建、检查和编辑 Microsoft Excel 工作簿及 XLSX 文件,支持可靠的公式、日期、类型、格式、重算及模板保留功能。
★ 367 📥 140,106
data-analysis

Data Analysis

ivangdavila
{"answer":"数据分析与可视化。查询数据库、生成报告、自动化电子表格,将原始数据转化为清晰可行的见解。适用于:(1) 您……"}
★ 198 📥 64,936