Grepular

Twitter to RSS with Google Cloud Function

Written 6 years ago by Mike Cardwell

2023-Oct-07 - I noticed this stopped working for me today. Not sure how long it has been broken. I’ve stopped using Twitter myself due to the lunatic leadership and have no interest in investigating why it is broken. See you on Mastodon


I don’t like having to install additional software to follow people/organisations on Twitter. I already have an RSS client. Why should I have to install a Twitter client too?

There are services like https://www.twitrss.me/ which gate Twitter to RSS, but they sometimes get ratelimited, as you’re sharing an API with many other people.

So I’ve created and released funcTwitter (GPL-3.0). It’s a simple NodeJS application that gates Twitter to RSS. It can be deployed as a Google Cloud Function, meaning you don’t need to run any special software on your own host. Google Cloud offers a generous permanent free tier for Cloud Functions, so you can easily do this for free for personal use.

You need to create a Google Cloud account and a Twitter development account. Details are in the documentation. Once setup, you can just point your RSS feed reader at URLs like:

https://YOUR_UNIQUE_CLOUD_FUNCTION_URL?secret=A_RANDOM_SECRET_YOU_CREATED&account=THE_TWITTER_ACCOUNT_TO_FOLLOW

The secret is basically an authentication token to prevent anybody else from calling the function.

You can also follow feeds based on searches by just switching out the “account” query string parameter with a “search” one instead:

https://YOUR_UNIQUE_CLOUD_FUNCTION_URL?secret=A_RANDOM_SECRET_YOU_CREATED&search=YOUR_SEARCH_TERM

Want to leave a tip?BitcoinMoneroZcashPaypalYou can follow this Blog using RSS or Mastodon. To read more, visit my blog index.