naystack - v1.5.10
    Preparing search index...
    • Creates and publishes a single Threads post. Handles the two-step container + publish flow with an automatic 2-second delay between creation and publishing (required by the Threads API).

      Parameters

      • token: string

        Threads access token.

      • text: string

        Post text.

      • Optionalreply_to_id: string

        Optional parent post id (to make this post a reply).

      Returns Promise<string | null | undefined>

      Promise of the published post id, or null if creation failed.

      import { createThreadsPost } from "naystack/socials";

      const postId = await createThreadsPost(accessToken, "Hello from Naystack!");
      console.log("Published:", postId);