Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

200
Views
Delete all tweets from personal twitter account

My Twitter account has been hacked and a scam posted about 500 scam-tweets from it.

The task: delete all tweets with JS in DevTools.

My solution:

const tweets = document.querySelectorAll('[data-testid="tweet"]')
for (let i = 0; i<= tweets.length; i++) {
   //1. Click on a tweet to show the tweet-menu:
   setTimeout(() => {tweets[i].querySelector('[aria-label="More"]').click()}, 1000)

   //2. Click on delete option:
   setTimeout(() => {document.querySelector('[role="menuitem"]').click()}, 1000)

   //3. Approve deleting in popup:
   setTimeout(() => {document.querySelector('[data-testid="confirmationSheetConfirm"]').click()}, 1000)
}

Problems:

  1. We need to scroll for more tweets and only then run it again.
  2. Each step (1,2,3) is not waiting for the previous to end running.
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

I think what you are looking for is the Twitter API, you can find the documentation here: Twitter Developer API

It allows you to log into your account with your API Key and post, delete and do basically everything with your account using code.

Alternatively, there is already a web application for bulk deleting tweets: TweetDelete

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!