Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Maybe reverse it from the web app.

I deleted a tweet and saw this request:

    HTTP POST https://x.com/i/api/graphql/VstuveVgh5q5jk7lmnVopqr/DeleteTweet
    {
        "variables": {
            "tweet_id":"12344567899123",
            "dark_request":false
        },
        "queryId":"VstuveVgh5q5jk7lmnVopqr"
    }

You can execute these from javascript in the browser if the auth part is too complicated.

### Update, this is the pure javascript console way, if you don't want to write your own client doing HTTP posts

I played with the console more and got these parts:

// Find all tweets on screen (this gives you the tweet IDs too)

    document.querySelectorAll('a > time')
// Click the "more" button on the first tweet

    document.querySelectorAll('a > time')[0].parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.querySelector('button').click()
// Click delete on the tweet

    document.querySelectorAll('[data-testid="Dropdown"]')[0].children[0].click()
// Confirm delete

    document.querySelectorAll('[data-testid="confirmationSheetConfirm"]')[0].click()


Shortly before they destroyed the API I made a little script to delete all my tweets. Was really really handy




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: