Skip to content

Unofficial, Reverse-Engineered Go API client for Meta's Threads.

License

Notifications You must be signed in to change notification settings

satorunooshie/threads

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

github.com/satorunooshie/threads

Go Doc

Unofficial, Reverse-Engineered Go API client for Meta's Threads.

Initialize

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{}))

APIs

GetUserID

GetUserID returns userID from account name.

id, err := client.GetUserID(ctx, "zuck")

GetUser

GetUser returns user information of user id.

b, err := client.GetUser(ctx, 314216)

response example: user.json

GetUserThreads

GetUserThreads returns user threads of user id.

b, err := client.GetUserThreads(ctx, 314216)

response example: threads.json

GetUserReplies

GetUserReplies returns user replies of post id.

b, err := client.GetUserReplies(ctx, 3141002295235099165)

response example: replies.json

GetPost

GetPost returns single post of post id.

b, err := client.GetPost(ctx, 3141002295235099165)

response example: post.json

GetLikers

GetLikers returns list of users who likes the post of post id.

b, err := client.GetLikers(ctx, 3141002295235099165)

response example: likers.json

Special Thanks

junhoyeo/threads-api

m1guelpf/threads-re

antonprokopovich/go-threads

About

Unofficial, Reverse-Engineered Go API client for Meta's Threads.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages