Unofficial, Reverse-Engineered Go API client for Meta's Threads.
Without options, it will fetch access token automatically via http.DefaultClient.
client, err := threads.NewClient(ctx)
With access token, it will use it to make requests to the API.
client, err := threads.NewClient(ctx, WithToken(`OqhxMWDlJViVPLZiN5p9Un`))
With http client, it will use it to make requests to the API.
client, err := threads.NewClient(ctx, WithClient(&http.Client{}))
With custom header, the original header will be modified to make requests to the API.
client, err := threads.NewClient(ctx, WithHeader(http.Header{}))
GetUserID returns userID from account name.
id, err := client.GetUserID(ctx, "zuck")
GetUser returns user information of user id.
b, err := client.GetUser(ctx, 314216)
response example: user.json
GetUserThreads returns user threads of user id.
b, err := client.GetUserThreads(ctx, 314216)
response example: threads.json
GetUserReplies returns user replies of post id.
b, err := client.GetUserReplies(ctx, 3141002295235099165)
response example: replies.json
GetPost returns single post of post id.
b, err := client.GetPost(ctx, 3141002295235099165)
response example: post.json
GetLikers returns list of users who likes the post of post id.
b, err := client.GetLikers(ctx, 3141002295235099165)
response example: likers.json