Giter VIP home page Giter VIP logo

twitter-cleaning's Introduction

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, 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 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.

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, Tweet Deleter or Tweet Eraser.

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 that supports my modest OSS contributions.

twitter-cleaning's People

Contributors

github-actions[bot] avatar adriantombu avatar guilhem-martin avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.