naystack - v1.5.10
    Preparing search index...
    • Creates a thread — a sequence of posts where each replies to the previous one. Newlines in post text are converted to %0A for the API.

      Parameters

      • token: string

        Threads access token.

      • threads: string[]

        Array of post text strings (in order). Each post after the first becomes a reply to the previous.

      Returns Promise<string | undefined>

      Promise of the first published post's id.

      import { createThread } from "naystack/socials";

      const firstPostId = await createThread(accessToken, [
      "First post in thread",
      "Second post (reply to first)",
      "Third post (reply to second)",
      ]);