Fetches the authenticated user's Threads posts.
Threads access token.
Optional
Optional array of field names. Default: ["text", "permalink", "username"].
["text", "permalink", "username"]
Promise of an array of posts (typed as T[], defaults to ThreadsPost[]).
T[]
[]
import { getThreads } from "naystack/socials";const threads = await getThreads(accessToken);for (const thread of threads ?? []) { console.log(thread.text, thread.permalink);} Copy
import { getThreads } from "naystack/socials";const threads = await getThreads(accessToken);for (const thread of threads ?? []) { console.log(thread.text, thread.permalink);}
Fetches the authenticated user's Threads posts.