post-for-me-ts-sdk

How to use the post-for-me Typescript SDK. For access to more information, try out the post-for-me MCP server.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "post-for-me-ts-sdk" with this command: npx skills add daymoondevelopment/post-for-me-skills/daymoondevelopment-post-for-me-skills-post-for-me-ts-sdk

Post For Me TypeScript SDK Guide

Overview

The Post For Me SDK enables cross-platform social media posting to Instagram, Facebook, TikTok, YouTube, Twitter/X, LinkedIn, Pinterest, Bluesky, and Threads. Create posts once and publish to multiple platforms simultaneously with platform-specific customizations.

Installation

Install the Post For Me TypeScript SDK from npm:

npm install post-for-me

Core Concepts

  • Social Accounts: Connected platform accounts that can receive posts
  • Social Posts: Content (caption + media) to be published
  • Post Results: Outcome of publishing to each platform
  • Account Feeds: Retrieve posts and metrics from connected accounts

Creating Posts

Basic Post (Instant Publishing)

const post = await client.socialPosts.create({
  caption: "Check out our new product! #launch",
  social_accounts: ["sa_abc123", "sa_def456"],
  media: [{ url: "https://example.com/image.jpg" }],
});

Scheduled Post

const post = await client.socialPosts.create({
  caption: "Scheduled announcement",
  social_accounts: ["sa_abc123"],
  scheduled_at: "2024-12-31T18:00:00Z", // ISO 8601 format
});

Draft Post

const draft = await client.socialPosts.create({
  caption: "Work in progress",
  social_accounts: ["sa_abc123"],
  isDraft: true, // Won't be processed/published
});

Platform-Specific Customization

Instagram Reels

await client.socialPosts.create({
  caption: "Check this reel!",
  social_accounts: ["sa_instagram"],
  media: [{ url: "https://example.com/video.mp4" }],
  platform_configurations: {
    instagram: {
      placement: "reels",
      share_to_feed: true, // Also show in feed
    },
  },
});

Twitter/X with Poll

await client.socialPosts.create({
  caption: "What feature should we build next?",
  social_accounts: ["sa_twitter"],
  platform_configurations: {
    x: {
      poll: {
        duration_minutes: 1440, // 24 hours
        options: ["Dark mode", "API v2", "Mobile app", "Analytics"],
      },
    },
  },
});

TikTok Configuration

await client.socialPosts.create({
  caption: "New dance challenge!",
  social_accounts: ["sa_tiktok"],
  media: [{ url: "https://example.com/dance.mp4" }],
  platform_configurations: {
    tiktok: {
      allow_comment: true,
      allow_duet: true,
      allow_stitch: true,
      privacy_status: "public",
    },
  },
});

Managing Social Accounts

List Accounts

const accounts = await client.socialAccounts.list({
  platform: ["instagram", "tiktok"],
  status: ["connected"],
});

Connect Account (OAuth Flow)

// Step 1: Generate auth URL
const { url } = await client.socialAccounts.createAuthURL({
  platform: "instagram",
  external_id: "user_123",
});
// Redirect user to `url` to complete OAuth

// Step 2: After OAuth callback, account is auto-created

Disconnect Account

await client.socialAccounts.disconnect("sa_abc123");

Media Upload

// Request upload URL
const { media_url, upload_url } = await client.media.createUploadURL();

// Upload file to signed URL
await fetch(upload_url, {
  method: "PUT",
  headers: { "Content-Type": "video/mp4" },
  body: videoFile,
});

// Use media_url in post
await client.socialPosts.create({
  caption: "My video",
  social_accounts: ["sa_abc123"],
  media: [{ url: media_url }],
});

Retrieving Post Results

// Get results for a specific post
const results = await client.socialPostResults.list({
  post_id: ["sp_xyz789"],
});

results.data.forEach((result) => {
  console.log(`Platform: ${result.social_account_id}`);
  console.log(`Success: ${result.success}`);
  if (result.platform_data.url) {
    console.log(`Posted at: ${result.platform_data.url}`);
  }
});

Fetching Account Feeds with Metrics

const feed = await client.socialAccountFeeds.list("sa_instagram123", {
  expand: ["metrics"], // Include analytics
  limit: 20,
});

feed.data.forEach((post) => {
  console.log(`Caption: ${post.caption}`);
  if (post.metrics) {
    console.log(`Likes: ${post.metrics.likes}`);
    console.log(`Comments: ${post.metrics.comments}`);
  }
});

Pagination

const posts = await client.socialPosts.list({
  limit: 50,
  offset: 0,
  status: ["processed"],
});

console.log(`Total: ${posts.meta.total}`);
console.log(`Next page: ${posts.meta.next}`);

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Coding

github-tools

Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.

Archived SourceRecently Updated
Coding

openclaw-version-monitor

监控 OpenClaw GitHub 版本更新,获取最新版本发布说明,翻译成中文, 并推送到 Telegram 和 Feishu。用于:(1) 定时检查版本更新 (2) 推送版本更新通知 (3) 生成中文版发布说明

Archived SourceRecently Updated
Coding

ask-claude

Delegate a task to Claude Code CLI and immediately report the result back in chat. Supports persistent sessions with full context memory. Safe execution: no data exfiltration, no external calls, file operations confined to workspace. Use when the user asks to run Claude, delegate a coding task, continue a previous Claude session, or any task benefiting from Claude Code's tools (file editing, code analysis, bash, etc.).

Archived SourceRecently Updated
Coding

ai-dating

This skill enables dating and matchmaking workflows. Use it when a user asks to make friends, find a partner, run matchmaking, or provide dating preferences/profile updates. The skill should execute `dating-cli` commands to complete profile setup, task creation/update, match checking, contact reveal, and review.

Archived SourceRecently Updated