Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/adriantombu/twitter-cleaning
Delete your old tweets & likes automatically with Github Actions
https://github.com/adriantombu/twitter-cleaning
github-actions hacktoberfest javascript-tools twitter twitter-api
Last synced: about 2 months ago
JSON representation
Delete your old tweets & likes automatically with Github Actions
- Host: GitHub
- URL: https://github.com/adriantombu/twitter-cleaning
- Owner: adriantombu
- License: gpl-3.0
- Created: 2021-11-22T21:42:10.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-04-29T00:22:15.000Z (8 months ago)
- Last Synced: 2024-05-01T17:29:04.530Z (8 months ago)
- Topics: github-actions, hacktoberfest, javascript-tools, twitter, twitter-api
- Language: JavaScript
- Homepage:
- Size: 54.7 KB
- Stars: 19
- Watchers: 3
- Forks: 35
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE.md
Awesome Lists containing this project
README
# Delete your old tweets & likes automatically
Unless you're some fancy public figure, no one is interested in what you wrote or liked two weeks ago (not even you) so why would you ever need to keep thousands of old data on Twitter?
Thanks to the witchcraft of Github Actions [Cron](https://en.wikipedia.org/wiki/Cron), you'll get to keep a nice and tidy Twitter account without even having to think about it. Pretty nice, hey?
> ⚠️ Starting April 2023, Twitter has restricted the access to the free tier and it's now impossible to delete your likes unless you pay for the Basic tier (at 100$ per month, it's probably not worth it)
## How to use it
- Get a Twitter API token on [https://developer.twitter.com](https://developer.twitter.com) and save your credentials
- Fork this repository
- Add the environment variables in your forked repository (`Secrets` page in the `Settings` tab) (look at the `.env.example` file to find the proper naming)
- Enjoy an automated cleaning of your oldest tweets and likes every 24 hours### Configuration
There are 5 parameters to define in the GitHub repository secrets.
#### Deletion days depth
Set `DELETE_AFTER_DAYS` parameter to define the number of days ("older than") after which the twitter cleaning will be performed - tweet deletion and likes deletion. The default value of the `DELETE_AFTER_DAYS` parameter is 14 days if you don't define it in the `Secrets`.
#### Twitter API
You can find a full explanation on how to retrieve the credentials on [TWITTER-CRENDENTIALS.md](./TWITTER-CRENDENTIALS.md).
### Run the actions
You have 2 options:
- Trigger manually the GitHub `Workflow` from the action tab.
- Set the CRON. By default, it performs the deletion every day.## Important note
Users that have thousands of tweets and likes won't be able to clean them on the first pass because of the Twitter API rate limiting: to give tou an idea, we are allowed to delete 50 tweets every 15 minutes and do 50 unlikes every 15 minutes. It will just take a while to clean up everything depending on the amount of tweets and likes you have.
If you don't want to wait, you can pay for a service like [TweetDelete](https://tweetdelete.net/), [Tweet Deleter](https://tweetdeleter.com/) or [Tweet Eraser](https://www.tweeteraser.com/).
## Disclaimer
This script is destructive and **will delete all your tweets and likes older than 14 days** (default value). Please make a full backup of your data before running it if you think you will ever need this data someday. I didn't because I don't care, but you're not me (it's for the best believe me).
*[Thanks to JetBrains](https://www.jetbrains.com/?from=Amazon%20Alternatives) that supports my modest OSS contributions.*