Publishes a thread — a sequence of posts where each replies to the previous one.
Threads access token.
Posts in order, as text or ThreadsPostInput.
Promise of the first published post's id.
import { createThread, MetaMediaType } from "naystack/socials";const firstPostId = await createThread(accessToken, [ "First post in thread", "Second post (reply to first)", { text: "Third, with a picture", media: { url: "https://cdn.example.com/3.jpg", type: MetaMediaType.Photo } },]); Copy
import { createThread, MetaMediaType } from "naystack/socials";const firstPostId = await createThread(accessToken, [ "First post in thread", "Second post (reply to first)", { text: "Third, with a picture", media: { url: "https://cdn.example.com/3.jpg", type: MetaMediaType.Photo } },]);
Publishes a thread — a sequence of posts where each replies to the previous one.