Skip to content

Instantly share code, notes, and snippets.

@aymericbeaumet
Last active June 2, 2024 10:17
Show Gist options
  • Save aymericbeaumet/d1d6799a1b765c3c8bc0b675b1a1547d to your computer and use it in GitHub Desktop.
Save aymericbeaumet/d1d6799a1b765c3c8bc0b675b1a1547d to your computer and use it in GitHub Desktop.
[Recipe] Delete all your likes/favorites from Twitter

Ever wanted to delete all your likes/favorites from Twitter but only found broken/expensive tools? You are in the right place.

  1. Go to: https://twitter.com/{username}/likes
  2. Open the console and run the following JavaScript code:
setInterval(() => {
  for (const d of document.querySelectorAll('div[data-testid="unlike"]')) {
    d.click()
  }
  window.scrollTo(0, document.body.scrollHeight)
}, 1000)
@nafal9aadi
Copy link

In my account, I have 53 unavailable posts that exist only as a number, and as for likes, they are 66 unavailable likes, and sometimes they are 99 likes. What is the solution to make the same number 0 in the posts and likes tab? I have tried all available solutions and have been suffering from this issue for more than a year and have not found a solution?!
Screenshot_٢٠٢٤٠٥١٤-٠٢١٧٠٥_X
Screenshot_٢٠٢٤٠٥١٤-٠٢١٦٥٧_X

@PrinOrange
Copy link

It takes new frontend version and use this code please

setInterval(() => {
  for (const d of document.querySelectorAll('button[data-testid="unlike"]')) {
    d.click()
  }
  window.scrollTo(0, document.body.scrollHeight)
}, 5000)

@softyoda
Copy link

Hi, is there only ways to delete them, not download them somewhere ? I just want to ctrl+f among my 10000+ liked tweet, but it is impossible, the infinite scrool broke after 200 loaded tweets, and I think it's by design.

@nafal9aadi
Copy link

nafal9aadi commented May 26, 2024

يتطلب الأمر إصدارًا جديدًا للواجهة الأمامية واستخدام هذا الرمز من فضلك

setInterval(() => {
  for (const d of document.querySelectorAll('button[data-testid="unlike"]')) {
    d.click()
  }
  window.scrollTo(0, document.body.scrollHeight)
}, 5000)

ما الذي تقصده بـ "إصدارًا جديدًا للواجهة الأمامية" ؟

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