Hacker News new | ask | show | jobs
by __bee 2945 days ago
You don't need all of this. All what you need is to request your data from twitter (Your Tweet archive > https://twitter.com/settings/account). Iterate through the csv file and use tweet_id to unlike, remove or do what you want through their Twitter API.

Source: I have done it before, and it took less time/work than what you have stated.

2 comments

When you say "all of this", that's only true for the browser-scraping part. You still need to use the API's CreateFavorite and DestroyFavorite calls on old tweets.

(As discussed, purely calling DestroyFavorite won't work on Tweets outside the 3200-tweet-capped API-accessible data store).

It seemed obvious to me that this is what he meant.
With the exception of the data retrieval method, the OP tried this, and suggests that simply having the tweet_id is not enough, if the tweet it corresponds to happens to be old enough (or something) to not be accessible by the API.
I did exactly this a while ago (before deleting my Twitter account for good) and with the id extracted from the downloaded CSV I could delete everything. Perhaps they've changed policies recently.

I wrote a couple of Python scripts to keep your timeline tidy (delete everything from the beginning, then trim and leave only the last N): https://github.com/rinze/obliterate_tweets

Twitter API allows you to get 3200 old tweets. That's not enough to delete all the tweets. If you request your data, you can get all your tweets.

>> tweet_id is not enough

tweet_id is enough to do any interaction if you give read/write to the key that you are using in your Twitter API. I deleted my tweets (back to 2012).

but it doesn't unlike. You have to re-like/un-like it now, too, beyond 3200.