Skip to content

Instantly share code, notes, and snippets.

@lionbytes
Last active February 15, 2023 13:04
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lionbytes/2e8ad01d0ec318354aa5e95b746c7e54 to your computer and use it in GitHub Desktop.
Save lionbytes/2e8ad01d0ec318354aa5e95b746c7e54 to your computer and use it in GitHub Desktop.
Twitter-API-Friendly Like Remover
For those who want to remove their Twitter likes in bulk, but are being blocked by Twitter's API,
I give you a slower version that is more API-friendly; it removes each like one at a time.
Open your Twitter likes page on a separate browser window, then run the following code in the console:
```javascript
setInterval(() => {
document.querySelectorAll('div[data-testid="unlike"]')[0].click();
window.scrollTo(0, window.pageYOffset+300);
}, 1000);
```
This is a modified version of Aymeric's code, as after testing it seems Twitter no longer allows it to run properly.
Aymeric's like bulk remover: https://gist.github.com/aymericbeaumet/d1d6799a1b765c3c8bc0b675b1a1547d
@taspatspro
Copy link

After some time twitter has this bug where your older liked tweets become normal ones (unliked, but still stay on the "liked" page). A version of the script where it likes, then unliked one tweet at the time would be even more great.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment