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

OPC Landing Page Manager

Landing page strategy, copywriting, design, and code generation for solo entrepreneurs. From product idea to a complete, self-contained, conversion-optimized...

Registry SourceRecently Updated
Coding

OPC Product Manager

Product spec generation for solo entrepreneurs. Turns a one-sentence idea into a build-ready spec that AI coding agents (Claude Code, etc.) can execute direc...

Registry SourceRecently Updated
Coding

设备

Use when querying or modifying device configurations on ESD service, calling REST APIs with sigV2 authentication on HK baseline or STG environments

Registry SourceRecently Updated
Coding

My Agent Browser

A fast Rust-based headless browser automation CLI with Node.js fallback that enables AI agents to navigate, click, type, and snapshot pages via structured co...

Registry SourceRecently Updated