Social Media

Blocking exact tweets

While playing with the Twitter API via a Go lib I saw someone call on people to troll reply to a tweet with a specific piece of text. This seemed like a really easy thing to search for and block. So I modified the little Go program from starting with ephemeral and put in this as the function run in main(). It searches for the string it’s given and then if the tweet consists solely of that text (compared by turning the string lowercase and then stripping out everything that’s not a letter) it blocks the user.

Ephemeral-ing Twitter

So now ephemeral was working on my current tweets, but not handling the “historical” ones which twitter deems to be the ones older than the 3,200 most recent. There are APIs that you can use to access those, but they require a paid license. So instead I went into my settings in twitter and requested an archive of my tweets. This takes a number of hours but eventually you get a download link and a while after using that you end up with a huge zip file.

Ephemeral Twitter Code

I’ve set up Vicky Lai’s ephemeral to make my tweets, well, ephemeral. But if you follow her README you’ll see the initial config is all manual. I’d rather have that be scripted so I can more easily replicate it in the future. So I wrote a script to create the AWS lambda instance. The prerequisites for this are covered in Vicky’s README but you’ll also need the aws cli, a go install and I find it’s also useful to use named profiles.

How I Use Twitter

Twitter bio: Yank techie and political geek. Lover of puns. Emigrated to Ireland back when US Presidential lies were impeachable. #repealedthe8th #imwithher Blocking Policy I block. A lot. If you feel I’ve blocked you incorrectly, send me an email (there are links on this site) and let me know. I share my block list and encourage people to make use of it. I block TERFs, bigots, bots, and trolls. Ephemeral Social Media I’m trying to use social media better.