Deploy FixTweet yourself
This documentation is a work in progress and will be incomplete as it is currently under development. Please check the main GitHub page for more information about FixTweet.
How to deploy FixTweet:
Clone the repository and install Node.js.
npm installin the repository directory.
wrangler.tomland add your Cloudflare account ID. Modify the worker’s name if necessary.
.envand modify HOST_URL, DIRECT_MEDIA_DOMAINS to match your domain and perform any other necessary changes.
Authenticate with Cloudflare using
npx wrangler login.
Publish your worker with
npx wrangler publish(or
npm run publish).
If you have more questions about setting up Cloudflare Workers, refer to their Getting Started guide.
After setting up your worker on
*.workers.dev, add your worker to your custom domain.
If you want to use Sentry in your product to catch exceptions, populate Sentry details in your
Set up elongator, see below.
In 2023, Twitter started blocking tweets with NSFW media from the guest API. To overcome this, FixTweet uses a service binding called elongator, which utilizes empty Twitter accounts to successfully make these requests. However, this is optional and only necessary for those planning to support embedding NSFW media. This method means you can bypass Twitter’s official API and avoid any associated costs. Please ensure you modify the URLs to match your actual repository and hosting details.