Skip to content

AayushGithub/threads-projects

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Projects With Meta's Threads.net

Overview

Threads-Projects is a repository that houses projects built around Meta's Threads.net platform. These projects utilize the Threads Unofficial API, a reverse-engineered Node.js/TypeScript client for Threads (see Credits for more information). The repository aims to showcase the capabilities of Threads and provide useful functionalities for Threads.net users.

Meta Threads

Threads.net is an online social media and social networking service owned by Meta Platforms. It operates in a similar manner to other microblogging platforms like Twitter. Users have the ability to post and share text, images, and videos, as well as interact with other users' posts through replies, reposts, and likes. Threads is closely integrated with Instagram, requiring users to have an Instagram account and use the same handle. While the mobile applications for iOS and Android devices offer full functionality, the web version provides limited features. The Unofficial Threads API aims to bridge this gap by providing a reverse-engineered Node.js/TypeScript client for Threads.

Projects

The Fortune Cookie Bot is one of the projects within the Threads-Projects repository. The motivation behind this project is to provide Threads.net users with valuable insights and a daily dose of wisdom. The bot leverages the Advice Slip API to fetch interesting advice and pairs it with a random image from various sources. The bot then posts the advice and the corresponding image on Meta's Threads.net platform.

Technologies and Dependencies

  • Node.js: A JavaScript runtime environment.
  • Express: A web application framework for Node.js.
  • Axios: A promise-based HTTP client for making API requests.
  • Threads Unofficial API: A reverse-engineered Node.js/TypeScript client for Threads.

Code

The source code for the Fortune Cookie Bot can be found in the fortune-cookie-bot directory of the repository. The project is built using Node.js and Express, providing a lightweight web server that exposes two endpoints. One endpoint, /post, triggers the bot to fetch advice from the Advice Slip API, retrieve a random image from a list of sources, and publish both the advice and the image to Threads.net. The other endpoint, /, serves a simple "Hello world!" message.

The OPT Timeline Bot is another project within the Threads-Projects repository. This project addresses the need to track F1 OPT case statuses efficiently. It accomplishes this by scraping the OPT Timeline website and posting updates on Meta's Threads.net platform.

Technologies and Dependencies

  • Node.js: A JavaScript runtime environment.
  • Express: A web application framework for Node.js.
  • Axios: A promise-based HTTP client for making API requests.
  • Threads Unofficial API: A reverse-engineered Node.js/TypeScript client for Threads.

Code

The source code for the OPT Timeline Bot can be found in the opt-timeline-bot directory of the repository. Similar to the Fortune Cookie Bot, this project is built using Node.js and Express. It provides two endpoints: /post, which triggers the bot to scrape the OPT Timeline website and publish updates to Threads.net, and /, which serves a basic "Hello world!" message.

ThreadCountFortune ThreadCountOPT

The Thread Count API was created to provide an easy way for users to showcase their Threads.net follower counts using customizable status badges. Whether you want to display your follower count on your personal blog, project documentation, or social media profiles, this API enables you to generate visually appealing badges that suit your preferences.

Technologies and Dependencies

The Thread Count API is built using the following technologies:

  • Node.js: A JavaScript runtime environment.
  • Express.js: A fast and minimalist web framework for Node.js.
  • Threads Unofficial API: A reverse-engineered Node.js/TypeScript client for Threads.
  • Badgen: A library for generating SVG badges.
  • Gradient Badge: A library for applying gradients to badges.
  • Swagger UI Express: A middleware for rendering Swagger UI documentation.

Code

The source code for the Thread Count can be found in the thread-count directory of the repository. Similar to the Fortune Cookie Bot, this project is built using Node.js and Express. It provides one endpoint: /thread-count/:username, which triggers the bot to fetch the follower count for the specified username and generate a badge displaying the count.

Parameters

The /thread-count/:username endpoint supports the following query parameters:

  • color (optional): The color of the badge. Default: blue.
  • style (optional): The style of the badge. Default: flat.
  • width (optional): The width of the badge icon. Default: 13.
  • scale (optional): The scale of the badge. Default: 1.
  • labelColor (optional): The color of the badge label. Default: black.
  • icon (optional): Whether to include the badge icon. Default: true.
  • label (optional): The label text for the badge. Default: Thread Count.
  • gradient (optional): Whether to apply a gradient to the badge. Default: true.

Deployment

Both projects are deployed using Vercel, a cloud platform for static and serverless deployment. Vercel allows for seamless deployment and hosting of Node.js applications. The live versions of the projects can be accessed at the following URLs:

Credits

About

Threads-Projects: Unleashing the power of Meta's Threads.net platform with insightful bots and efficient workflows

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published