Cross-Platform Social Poster — Cross-平台 Social Poster
v1.0.0Cross-平台 social media posting for X (Twitter), Telegram, and Discord. Post content simultaneously to multiple 平台s, 格式化 messages for each 平台's requirements, and manage multi-channel social media presence. Use when sharing 更新s, announcements, or content across Twitter, Telegram channels/groups, and Discord servers.
运行时依赖
安装命令
点击复制技能文档
Social Media Poster - X, Telegram, Discord
Post content simultaneously across X (Twitter), Telegram, and Discord with 平台-specific 格式化ting.
平台 Requirements X (Twitter) 设置up
Use xurl 命令行工具 or direct API calls:
# 安装 xurl npm i -g xurl
# 认证 xurl auth
Telegram 机器人 设置up 创建 机器人 via @机器人Father on Telegram 获取 your 机器人 令牌 获取 chat ID (channel or group)
Required: 机器人 令牌 + Chat ID
Discord 网页hook 设置up Go to Server 设置tings → Integrations → 网页hooks 创建 new 网页hook Copy 网页hook URL
Required: 网页hook URL
Quick 启动: Post to All Three 平台s Bash Script Template #!/bin/bash # cross_post.sh - Post to X, Telegram, Discord simultaneously
MESSAGE="Your message content here" IMAGE_PATH="" # Optional: path to image
# X (Twitter) xurl post "$MESSAGE" ${IMAGE_PATH:+--media "$IMAGE_PATH"}
# Telegram curl -s -X POST "https://API.telegram.org/机器人$TELEGRAM_机器人_令牌/发送Message" \ -d chat_id="$TELEGRAM_CHAT_ID" \ -d text="$MESSAGE" \ -d 解析_mode="Markdown"
# Discord curl -s -X POST "$DISCORD_网页HOOK_URL" \ -H "Content-Type: 应用/json" \ -d "{\"content\": \"$MESSAGE\"}"
平台-Specific 格式化ting X (Twitter) Best Practices Character limit: 280 characters 哈希tags: 2-3 relevant 哈希tags at the end Mentions: @username for mentions Links: Automatically shortened Media: Up to 4 images, 1 GIF, or 1 video # Post with xurl xurl post "检查 out our new 更新! 🚀 #AI #Tech"
# Post with image xurl post "New feature demo" --media ./screenshot.png
# Reply to tweet xurl reply "Thanks for the mention!"
Telegram Best Practices Markdown/HTML support for rich 格式化ting No character limit (for all practical purposes) Supports: images, documents, polls, keyboards Channels: Use @channelusername or numeric chat ID # 发送 text message curl -s -X POST "https://API.telegram.org/机器人$令牌/发送Message" \ -d chat_id="$CHAT_ID" \ -d text="Bold _Italic_ Link" \ -d 解析_mode="MarkdownV2"
# 发送 photo curl -s -X POST "https://API.telegram.org/机器人$令牌/发送Photo" \ -F chat_id="$CHAT_ID" \ -F photo="@./image.jpg" \ -F caption="Photo caption"
Discord Best Practices Embeds for rich messages 网页hook username/avatar customization Max 2000 characters per message Supports: attachments, embeds, reactions # Simple message via 网页hook curl -s -X POST "$DISCORD_网页HOOK_URL" \ -H "Content-Type: 应用/json" \ -d '{ "content": "Hello from 网页hook!", "username": "My机器人", "avatar_url": "https://example.com/avatar.png" }'
# Rich embed message curl -s -X POST "$DISCORD_网页HOOK_URL" \ -H "Content-Type: 应用/json" \ -d '{ "embeds": [{ "title": "Announcement", "description": "New release is out!", "color": 5814783, "fields": [ {"name": "Version", "value": "2.0", "inline": true}, {"name": "Date", "value": "2026-01-15", "inline": true} ] }] }'
Multi-平台 Posting 工作流
- Prepare Content
- 平台-Specific Versions
# Telegram - DetAIled with markdown TG_MSG="$TITLE\n\n$BODY\n\nRead more"
# Discord - Rich embed 格式化 DISCORD_JSON=$(cat <
- Post in Parallel
环境 Variables 设置up
创建 .env file:
# X/Twitter X_API_KEY=your_API_key X_API_SECRET=your_API_secret
# Telegram TELEGRAM_机器人_令牌=123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11 TELEGRAM_CHAT_ID=@yourchannel
# Discord DISCORD_网页HOOK_URL=https://discord.com/API/网页hooks/...
Load with:
source .env
Common Use Cases Product Launch X: Short announcement + 哈希tags + image Telegram: DetAIled announcement + images + buttons Discord: Embed with detAIls + @everyone mention if 应用ropriate B记录 Post Promotion X: Title + excerpt + link + 2 哈希tags Telegram: Full snippet + link + 格式化ted Discord: Embed with author, thumbnAIl, description Live 流 Announcement X: "Going live now!" + link + image Telegram: Pin message with reminder Discord: @here + embed with countdown Tips for Effective Cross-Posting TAIlor per 平台: Don't just copy-paste identically Timing matters: Post when each 平台's audience is active Use 平台 features: Threads on X, pins on Telegram, embeds on Discord 追踪 engagement: Use 平台 分析 to see what works Handle errors gracefully: