编程

Cross-Platform Social Poster

试用

Cross-platform social media posting for X (Twitter), Telegram, and Discord. Post content simultaneously to multiple platforms, format messages for each platf...

它能做什么

Social Media Poster - X, Telegram, Discord

技能文档

Social Media Poster - X, Telegram, Discord

Post content simultaneously across X (Twitter), Telegram, and Discord with platform-specific formatting.

Platform Requirements

X (Twitter) Setup

Use xurl CLI or direct API calls:

# Install xurl
npm i -g xurl

# Authenticate
xurl auth

Telegram Bot Setup

  1. Create bot via @BotFather on Telegram
  2. Get your bot token
  3. Get chat ID (channel or group)

Required: Bot token + Chat ID

Discord Webhook Setup

  1. Go to Server Settings → Integrations → Webhooks
  2. Create new webhook
  3. Copy webhook URL

Required: Webhook URL


Quick Start: Post to All Three Platforms

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/bot$TELEGRAM_BOT_TOKEN/sendMessage" \
  -d chat_id="$TELEGRAM_CHAT_ID" \
  -d text="$MESSAGE" \
  -d parse_mode="Markdown"

# Discord
curl -s -X POST "$DISCORD_WEBHOOK_URL" \
  -H "Content-Type: application/json" \
  -d "{\"content\": \"$MESSAGE\"}"

Platform-Specific Formatting

X (Twitter) Best Practices

  • Character limit: 280 characters
  • Hashtags: 2-3 relevant hashtags 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 "Check out our new update! 🚀 #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 formatting
  • No character limit (for all practical purposes)
  • Supports: images, documents, polls, keyboards
  • Channels: Use @channelusername or numeric chat ID
# Send text message
curl -s -X POST "https://api.telegram.org/bot$TOKEN/sendMessage" \
  -d chat_id="$CHAT_ID" \
  -d text="*Bold* _Italic_ [Link](https://example.com)" \
  -d parse_mode="MarkdownV2"

# Send photo
curl -s -X POST "https://api.telegram.org/bot$TOKEN/sendPhoto" \
  -F chat_id="$CHAT_ID" \
  -F photo="@./image.jpg" \
  -F caption="Photo caption"

Discord Best Practices

  • Embeds for rich messages
  • Webhook username/avatar customization
  • Max 2000 characters per message
  • Supports: attachments, embeds, reactions
# Simple message via webhook
curl -s -X POST "$DISCORD_WEBHOOK_URL" \
  -H "Content-Type: application/json" \
  -d '{
    "content": "Hello from webhook!",
    "username": "MyBot",
    "avatar_url": "https://example.com/avatar.png"
  }'

# Rich embed message
curl -s -X POST "$DISCORD_WEBHOOK_URL" \
  -H "Content-Type: application/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-Platform Posting Workflow

1. Prepare Content

# Base content
TITLE="Big Announcement"
BODY="We just launched something amazing. Check it out!"
LINK="https://example.com/news"
IMAGE="./announcement.png"

2. Platform-Specific Versions

# X (Twitter) - Concise
TWEET="$TITLE: $BODY $LINK #News #Launch"

# Telegram - Detailed with markdown
TG_MSG="*$TITLE*\n\n$BODY\n\n[Read more]($LINK)"

# Discord - Rich embed format
DISCORD_JSON=$(cat <<EOF
{
  "content": "",
  "embeds": [{
    "title": "$TITLE",
    "description": "$BODY",
    "url": "$LINK",
    "color": 3447003
  }]
}
EOF
)

3. Post in Parallel

# Post to all three platforms (background for speed)
xurl post "$TWEET" --media "$IMAGE" &
curl -s -X POST "https://api.telegram.org/bot$TOKEN/sendPhoto" \
  -F chat_id="$CHAT_ID" -F photo="@$IMAGE" -F caption="$TG_MSG" &
curl -s -X POST "$DISCORD_WEBHOOK" \
  -H "Content-Type: application/json" -d "$DISCORD_JSON" &
wait
echo "Posted to all platforms!"

Environment Variables Setup

Create .env file:

# X/Twitter
X_API_KEY=your_api_key
X_API_SECRET=your_api_secret

# Telegram
TELEGRAM_BOT_TOKEN=123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11
TELEGRAM_CHAT_ID=@yourchannel

# Discord
DISCORD_WEBHOOK_URL=https://discord.com/api/webhooks/...

Load with:

source .env

Common Use Cases

Product Launch

  • X: Short announcement + hashtags + image
  • Telegram: Detailed announcement + images + buttons
  • Discord: Embed with details + @everyone mention if appropriate

Blog Post Promotion

  • X: Title + excerpt + link + 2 hashtags
  • Telegram: Full snippet + link + formatted
  • Discord: Embed with author, thumbnail, description

Live Stream Announcement

  • X: "Going live now!" + link + image
  • Telegram: Pin message with reminder
  • Discord: @here + embed with countdown

Tips for Effective Cross-Posting

  1. Tailor per platform: Don't just copy-paste identically
  2. Timing matters: Post when each platform's audience is active
  3. Use platform features: Threads on X, pins on Telegram, embeds on Discord
  4. Track engagement: Use platform analytics to see what works
  5. Handle errors gracefully: If one platform fails, others should still post

相关技能

通过一次 REST API 调用,向 10 个社交平台发布视频、图片、文字与文档。

作者 victorcavero14375 次安装50 星标

通过 6551 REST API 查询 Twitter/X 用户资料、推文、粉丝事件与 KOL 数据。

作者 infra403840 次安装27 星标

把自然语言描述转为结构化 JSON,并由 mcp-diagram-generator MCP 服务生成 Draw.io、Mermaid 或 Excalidraw 图表文件。

作者 nssa.io1.0k 次安装47 星标

在本地磁盘以分类纯 Markdown 文件保存需要长期留存的事实,与智能体内置记忆并存。

作者 Iván555 次安装18 星标

以 AI 机器人身份加入视频会议,提供语音、虚拟形象与屏幕共享四种模式。

作者 johnpatternai21 次安装8 星标

通过托管的 OAuth GraphQL 接口查询与管理 Linear 的 issue、项目、团队、周期、标签和评论。

作者 byungkyu518 次安装18 星标

terrycarter1985 的更多技能

浏览全部技能

为中国小学三到六年级英语书面作业打分,并给出符合年龄的鼓励式反馈。

作者 terrycarter198517 次安装

Analyze stocks and cryptocurrencies using Yahoo Finance data. Supports portfolio management (create, add, remove assets), crypto analysis (Top 20 by market c...

作者 terrycarter198524 次安装

Control whole-house music scenes combining Spotify playback with Airfoil speaker routing. Quick presets for morning, party, chill modes.

作者 terrycarter198519 次安装

Generate reusable, policy-aligned customer service replies for e-commerce aftersales scenarios. Use when support staff need fast, compliant Chinese responses...

作者 terrycarter198518 次安装

Control whole-house music scenes combining Spotify playback with Airfoil speaker routing. Quick presets for morning, party, chill modes.

作者 terrycarter198516 次安装

Comprehensive developer cheatsheets and quick references for Git, Docker, Kubernetes, jq, curl, and common Linux commands. Use when needing quick lookups for...

作者 terrycarter198516 次安装