naystack - v1.5.10
    Preparing search index...
    • Fetches a single Threads post by id.

      Parameters

      • token: string

        Threads access token.

      • id: string

        Post id.

      • Optionalfields: string[]

        Optional array of field names. Default: ["text", "permalink", "username"].

      Returns Promise<T | null>

      Promise of post data (typed as T, defaults to ThreadsPost).

      import { getThread } from "naystack/socials";

      const post = await getThread(accessToken, postId);
      console.log(post?.text, post?.permalink);