Researchers interested in studying the conversation around a topic often use the search endpoints to get Tweets on a topic. You can edit the script as you wish or make suggestions on changes you'd like to see implemented.The Twitter API allows developers and researchers to get Twitter data programmatically. I don't recommend doing too many at once, so as to not trigger Twitter for suspicious activity. The template for use is the following: python. If Python is installed and everything else is in order, we can run the commands to run the application.įirst, copy and paste the following command to install the required dependencies: pip install -r "requirements.txt"Īnd you're ready to go to finally mass delete your tweets. You should be looking at a window that looks like the following image. The easiest way to do this is on Windows is to press Shift+Right Click on that folder in the file explorer, and use the following option: Open the command line or PowerShell on the folder you have all of the files in. I wanted this guide to be as accessible to non-programmers as possible, but I can't get around using the command line to run the Python script (I could make a proper .exe program but it would make this method less transparent). Copy and paste them with "" on the appropriate place in the keys.json file, like so: "consumer_key" : "abcdefgh12345" Then, take the access tokens and application keys that you saved earlier and place them in the "keys.json" file, which you'll have to edit appropriately. Simply unzip the release to a folder of your choosing (or download the source code, it's the same thing) and then place " archive.zip" in it (the original zip file, not a folder with its contents), among the script files. You can find the full Python script here: If you lose them, you'll have to create new ones later. For security reasons, those are only shown for a limited time, so write them down somewhere in a separate file. Go to Keys and Tokens and get the Consumer Keys (key and secret) and the Access Token (and its secret). Just ensure it has read and write permissions. The creation process changes a lot as the Twitter Dev dashboard is always getting updated, but it's simple. Once you're approved, go into your dashboard and create a new project/app. Rename this Zip file to " archive.zip" and don't extract it, just place it in a clean/new folder.īack to the Twitter Dev. Download your archive and you'll get a zip of your entire tweet history. Once you get it (or just after a day or so has passed), you go to the same place and you'll see the following image. In 24h or less, you'll get a notification telling you it's ready. To do it you go here, input your password and press "Request Archive". For security reasons, this has a waiting period like the Dev account. The second thing is going into your settings and downloading an archive of your data. The first one is to install Python, which you can get here: It's a very simple programming language to use, but I already wrote the code so you'll only have to run the script. In the meantime, there are two other things you need to do. I wrote I wanted to use the API to manage my tweets and get interaction metrics and I got mine approved in a couple of days. You can apply for a Twitter Developer account here: This whole process relies on using a Twitter Developer account of your own making, which is the only way to directly access the Twitter API. This Python script is fairly simple to parse to anyone with basic Python experience and it is open to scrutiny - I'm only trying to provide a tool for others in similar situations to mine, and I'm aware of how important transparency is in doing this. We'll be running a simple Python script over an archive of your Tweets provided by Twitter itself. Here, we're not using any outside service. The solutions tend to be garbage: services that only delete up to 3k tweets, messy screen-crawlers that bug out often or paywalled unsafe websites that will abuse your account info. Often we want to make a clean slate of our accounts without losing the account itself, so there's some demand for this. I'll guide you step by step so that even if it's your first time doing anything related to programming, you should be able to run this. It takes some technical know-how, but in my opinion, it's the best and safest way to delete your records on Twitter. Hi, I've made a method to delete all of your tweets. More recent versions of Python require different syntax and it won't work.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |