Posts Tagged ‘Twitter’

What is @DrunkBuzzFeed?

January 30, 2014

If you follow me on Twitter, you might have noticed that I’ve been retweeting an account called @DrunkBuzzFeed (formerly @BuzzfeedEBooks) fairly frequently. As with most tweets that most people send, there’s a good chance you ignored it, or didn’t think twice about it.

Well, you’re reading this blog post, so maybe now you’re interested: @DrunkBuzzFeed is a robot I made that takes a beginning, middle and end from 3 different randomly selected Buzzfeed headlines, and sends them out as a mashed together tweet. Sometimes the results make perfect sense, and sometimes they don’t. Here are some examples:

For me, the best part of these tweets is that I run the account, and I have no idea what they are going to be. They make me laugh out loud somewhat regularly. If you’re curious about how I made the bot, read this blog post. It’s long, and a little technical. But not very difficult. If you have a Mac, I think you could build one yourself.

So that’s that. The next thing you might ask me is…

Why did I make @DrunkBuzzfeed?

@DrunkBuzzFeed was born out of two things: First off, months, or maybe even years of conversation with a few friends about how frustrating the articles we see shared around the web are. It’s a common bit around the office to mockingly come up with Buzzfeed-esque headlines to describe mundane situations we’re in.

The second one was a fascination with other Twitter bots (or faux Twitter bots) such as @Horse_eBooks that had gotten so much attention.

With these two things in mind, my friend Cameron and I came up with the idea of building a bot that tweets fake Buzzfeed headlines. The project had numerous false-starts and dead ends, and probably was built over the course of a couple months. If you followed my blog post now, you could probably set up your own in two hours. With the combination of our inspirations in mind, the project was originally named @BuzzfeedEbooks

We were hoping that the twitter account would have some viral success of its own with the help of a few retweets, but it was an absolute failure in that regard. We discussed, though never went through with, buying fake followers, and eventually tried rebranding it a couple times. @DrunkBuzzFeed is what we’ve settled on for now.

As of earlier today, the account had 11 followers, most of whom I had told personally about the account. The account has been a failure, in all ways but one: I think it’s funny, and a couple I’ve told about it think it’s funny. My hope is that explaining it here, a few more people will think it’s funny.

Even though it brings laughter to me, and I hope it brings laughter to you, I’d like to stand up on my very small soapbox for a moment.

Why Do I hate Buzzfeed so much?

I have never made or attempted to make a career as a journalist. I studied journalism in college, and worked as an editor on our weekly student paper, The Torch, but I was never the best at it. Since then, my closest attempts at journalism are this blog and this frequently abandoned Chicken Wing review site..

I got a communications degree with a focus in New Media/Journalism, and I am much more on the New Media side of that spectrum. I spend my time working at boom. reactive. doing social media management for companies in the St. Louis area. Yeah, I sit on Facebook all day.

One of my least favorite things about being on Facebook all day is seeing the links to “news stories” my friends are sharing. I didn’t put the word friends in quotes, because I mean it. Many of the people who share crappy links on Facebook are people who I respect a lot, and who I think are otherwise good folks. I did put “news stories” in quotes, because most of the things shared aren’t news.

Buzzfeed, ViralNova, UpWorthy, UpRoxx and more popping up weekly it seems like. These are sites that make The Huffington Post look like The Wall Street Journal/New York Times – whichever one of those you view the most favorably.

Here are seven screenshots I just have sitting around:

Screen Shot 2013-12-01 at 11.03.38 PM

Screen Shot 2014-01-30 at 5.31.49 PM

Screen Shot 2014-01-30 at 5.36.00 PM

Screen Shot 2014-01-30 at 5.41.57 PM

Screen Shot 2013-11-25 at 2.07.27 PM

Screen Shot 2013-11-14 at 5.35.20 PM

Screen Shot 2013-11-13 at 10.55.11 AM

Why do any of these things even exist? Clearly they aren’t news, so what about their value as entertainment?

These sites are the reality TV of the internet: lowest possible budget & lowest common denominator. Beyond that, the larger of these sites like Buzzfeed make loads of money selling advertisements on content written by unpaid writers. And much of the content is stolen without credit or payment from elsewhere on the internet.

Throw in an endless opportunity for confirmation bias, an insistence on EXPERIENCING HEIGHTENED EMOTIONS AT ALL TIMES (“You’ll be shocked”, “you won’t believe”, “This will change everything”), and headlines that offer no clue about what’s inside. It all just drives me nuts

And I click on it, you click on it. We all do, and they make money because of it. Meanwhile, sites and services that strive to create real content of value are struggling & failing regularly.

So, what’s the solution? How many people even believe it’s a problem? I’m not advocating endless support for dead-tree companies that are doing a crappy job transitioning to the modern age. I’m not telling anyone to stop clicking on these stories, though I would encourage you to think before sharing them.

The internet is an endless source of proverbial junk food, and it’s fine if you enjoy some occasionally. But every now and then, it might be nice to eat a healthy meal.

Building an automated Twitter bot

January 30, 2014

@DrunkBuzzFeed is an semi-automated Twitter bot that I built. I break up a bunch of headlines from Buzzfeed into 3 parts, and put them in a Google Drive spreadsheet. Through a variety of automation services, the headline parts are strung together and tweeted out 9 times a day. Using this guide, you should be able to make something similar (or even identical) yourself. I encourage you to do so.

No coding is required. The only thing you need to have to start this tutorial is a computer running OS X. This tutorial was made using 10.9 Mavericks, but it would probably work with older versions as well. It would be to your benefit if you were able to leave this computer on all the time, with persistent internet access but this (probably?) isn’t required for operation.

Follow this guide, look at the screenshots (click on them to see them full size), and don’t give up. Good luck!

1. Get a new Google account, Make sure Dropbox is installed on your computer, get a new Twitter account.

Click here to sign up for a new Google account. It doesn’t really matter what you call it. Don’t use a Google account you already have.

If you’ve already got a Dropbox account and the Dropbox OS X app is already installed on your computer, move along to the next paragraph. If you don’t already have a Dropbox account (what’s wrong with you?), click here to sign up for one. If you don’t have the app installed on your computer, go here and install it.

Finally, sign up for a new Twitter account. This will be where your automated tweets are posted from. Sign up with the email address you just created to keep things straight.

2. Collect content

For @DrunkBuzzFeed, the content is made up of parts of Buzzfeed headlines. Since I hate Buzzfeed, I didn’t want to go there and collect the content myself, so I made the automator service IFTTT (If This Then That) do it.

Even if your content isn’t Buzzfeed headlines, sign up for an account because you’ll need it later. If you already have an account, it’s fine to use that one.

IFTTT calls their automations “recipes”. I made a set of recipes that collect new headlines from every Buzzfeed category, and puts them in the same Google Drive document. You’ll have to connect your Google Drive to your IFTTT to use this recipe, but they’ll walk you through that.

Here’s a sample recipe. I made one of these for each Buzzfeed headline category, but they all end up in the same document.

3. Break up content

IMAGE1

When I’m ready to add new content to @DrunkBuzzFeed, I select all the headlines (command+a), cut them (command+x) and paste them (command+v) into a new TextEdit document. TextEdit’s a program that’s already on your computer.

Once I’ve got the contents pasted into TextEdit, I turn the document into plain text (command+shift+t) but that’s personal preference. Then I start breaking the content up with the tab key. I break each headline into 3 parts, so that means I’ll put 2 tab breaks in each headline. It should look something like this:

IMAGE2

Once you get everything set up, this step and the next one will be the only thing you do to keep your bot fresh. It’s also the only place you have any kind of creative control. Have some fun with it!

4. Input content

Copy all of your newly separated headlines (command+a, command+c). Head back to Google Drive, and make a new spreadsheet. Name it something you’ll remember

On Sheet 2 (trust me) of your spreadsheet, paste (command+v) all of your headlines. BAM! All your Tabs have turned into new cells.

IMAGE3

5. Randomize content to create a piece of new content

So now you’ve got all the parts in place, and here’s where the real automation magic comes into play. For ease of organization, make a Sheet 3, and do this step there.

Next, Follow this guide which does a great job of explaining spreadsheet formulas. Change things as they apply to you. Here’s what mine looks like

IMAGE4

As you can see, @DrunkBuzzFeed is chosen from 3 columns of 298 choices. That gives it a possible output over 25,000,000 tweets, assuming each cell was unique.

At this point, you should have a cell that puts together 1 choice from each column, forming something new in a single cell. Now, make Sheet 4 and make cell A1 point to that end product. It might be something like “=Sheet3!A3”. If you’re doing it right, it should display the same thing as your end product on Sheet 3. This is what mine looks like:

IMAGE5

6. Get the tweet out of Google Drive and format it

A couple last things before we can get out of Google Drive. First, make your spreadsheet public. I don’t know 100% if this is necessary, but you’re going to be calling on it from another service later, so it can’t hurt. To do this, click the blue “share” button at the top left of the window, and select this option:

IMAGE6

Finally, in your spreadsheet, go to File > Publish To Web. For your settings, if you’ve followed all my advice, “Sheets to Publish” should be set to Sheet 4, Automatically Republish when changes are made should be checked, Get a link to published data should be “TXT (Plain Text)” and your cells should be set to A1. I didn’t follow all my advise, so here’s what mine looks like:

IMAGE7

Copy and paste that link at the bottom into a new browser window. You should also save it somewhere for later. If you’ve done your job right, SpreadSheetName.tsv should download. Here, try mine. Open that with text edit, and it should be one line that’s a combination of 3 Buzzfeed headlines. Now how do you turn that into a Tweet? This is the part that had me stumped for the longest time. We’re going to turn to an OS X app you’ve probably never used before called Automator. It should be in your Applications folder. If you can’t find it, bring up spotlight (command+space) and search for it.

Open Automator, and navigate to File > New > Application. Yeah, you’re making your own application. Heads up: we’re going to be using the app’s search bar a lot to work quickly. We’re going to do 5 easy tasks.

Task 1: Get Specified URL

Find the “Get Specified URL” task with the search bar. Make the only URL in there the one that comes from your Google Drive spreadsheet. It should look like this

IMAGE8

Task 2: Download URLs

This is going to allow you to save that file into a folder of your choosing. The folder you choose should in your public Dropbox folder, and should be used only for this purpose. Here’s what mine looks like:

IMAGE9

Tasks 3, 4 & 5: Rename Finder Items: Add Date or Time

Now, we want to make sure each file has a unique name by date stamping it. First, we’re going to rename the finder item as such: Add date or time > Created > Hour Minute > After name > Dash > Space. Then we’re going to rename the finder item Add Date or Time > Created > Month Day Year > After Name > Forward Slash > Space. These two tasks should look like this:

IMAGE10

The last Rename Finder Items tab is to change the file extension. So it will go Replace Text > Find tsv in > Full Name (ignore case checked) > Replace: txt. Mine looks like this

IMAGE11

Now, run it. Ignore the warning. You should see 6 green checkmarks at the bottom that everything has run correctly. And if you navigate to your specified folder, you should have a new file:

IMAGE12

Save your file as something you’ll remember in the same folder that your tweets will be outputting to. Close Automator. Double click on your new application, and ignore any warnings and let it run. The file should create itself without Automator opening at this point.

7. Make tweet readable by IFTTT

IFTTT is the program we’re eventually going to use to send the Tweet, but it can’t read the content of plain text documents. Fortunately, there’s another Automator service called Zapier that can. You probably don’t have a Zapier account, so create one here.

Now, Zapier COULD turn this .txt file into a tweet ALL BY ITSELF in 1 step, BUT we’re not going to go that route. You see, Zapier only allows 100 free actions a month, and so we limit the load on Zapier and put as much of it as possible on IFTTT which allows unlimited free actions a month.

For @DrunkBuzzFeed which sends 9 tweets a day (around 270 a month), I have 3 different Zapier accounts do the work to keep it free for me. With 1 Zapier account, you can do up to 3 a day every month.

The only service you need to connect to your Zapier account is Dropbox. Do so. Then we’re going to create a new Zap. (Zapier Zaps = IFTTT Recipes). My Zap can be found here, but I’ll walk you through how to make your own.

Click “Make A Zap” and make both your trigger and action services Dropbox. Make the trigger “New File In Directory” and make the Action “Create New Text File”. Click “continue” and use the same dropbox account for both your trigger and your action.

For “Only trigger a “New File in Directory” from Dropbox when…” go choose your directory and make it where you just made your Automator task. This is a dumb process and it takes a long time to drill it down. Be patient. Don’t add any custom filters, just click “continue”

Now have it output to A DIFFERENT FOLDER. Make one in your Dropbox Public folder first in Finder, then drill down again just like you did last time to find it.

For “Name of New File” insert “File Text”. You can do the same for File Content. It should look like this:

IMAGE13

Test it. You should end up with a new file in your output dropbox folder that’s called “(whatever the body of your old document used to be).txt”. Deep breath. We’re almost there.

8. Send the Tweet

We’re heading back to IFTTT for steps 8 and 9. This first one is going to take your output from Zapier and send it to Twitter. You’ll need to connect your Dropbox and Twitter accounts, but it will walk you through that. Here’s the recipe I used, but I’ll show you how to make it on your own .

Click create, then: If > Dropbox > New File In Your Public Folder > Subfolder Name wherever you have your Zapier output going > Then > Twitter > Post A Tweet > FileNameNoExt… and that’s it. You’re now to a point where if you run the Automator application you created, within 30 minutes, a tweet will show up. I say within 30 minutes, because Zapier and IFTTT aren’t checking all the time, they do it on 15 or so minute intervals. We’re not done with IFTTT yet though!

9. Make New Tweets

We can’t just send the same tweet over and over again. Fortunately, you may have noticed, your randomly generated tweet changes every time you make a change to the spreadsheet. And fortunately, IFTTT can make changes to the spreadsheet for you! Here’s my recipe that does that, but once again I’ll walk you through it.

If > Date and Time > Every Hour At > Doesn’t Matter Minutes Past the Hour > Then > Google Drive > Add Row to Spread Sheet > Spreadsheet Name “Whatever you called your spreadsheet all the way back in step 4” > Put anything in the row. It doesn’t matter what you put, just something> Get rid of Drive Folder Path if it’s in your main Drive folder and Create Action.

Now you’ll be generating a new thing every hour, whether you use it or not.

10. Schedule Tweets to run forever

You don’t want to have to run your application every time you want a new tweet published. This last step will allow you to schedule them forever, so they’ll run when you’re away from your computer (if you’re computer’s on), or while you’re at your computer and you don’t want to think about sending new tweets

Open up Calendar for OS X. Go to File > New Calendar > On My Mac. Call it “Tweet Schedule” or whatever you want.

Right click on a time that’s like 15 minutes from now. Make a “New Event” Make sure your new event is on the calendar “Tweet Schedule” Call the event whatever you want. Make the event time short, maybe 10 minutes long. Set Alert > Custom > Open file > THE APP YOU MADE” Make it repeat every day, if you want. It should look like this: (but with Repeat on “every day”)

IMAGE14

Now… wait for the event time. When it comes, your app will run in the background. You won’t see it. What you should see is a new file in your designated Dropbox folder. In 15 minutes or less, Zapier will take that file and rename it. 15 minutes or less after that, IFTTT will take that renamed file and tweet it. If you set this calendar event to repeat every day, you’ve created an automated twitter bot!

With 1 free Zapier account, you can send 3 tweets/day. Create 2 other additional recurring events. For every additional Zapier account you make, you’ll be able to schedule 3 more tweets/day, but you’ll have to duplicate your Automator setup into a new folder. And if everything works, that’s it!

Tips, tricks and thanks

  • Automator uses Safari, and for whatever reason you need to be logged in to a Google account (any Google account) on Safari for your app to work. Every 2 weeks or so, Safari/Google will sign you out of your account, and you’ll have to sign back in for your tweets to start working again.
  • Clean out your Google Document collecting new headlines and your Google Spreadsheet that IFTTT is adding to. Do this somewhat regularly (weekly?. They get unruly when they are too large.
  • I hate Buzzfeed so much
  • Thanks to @CameronBanga who also hates Buzzfeed for helping me come up with this idea. I wouldn’t have done it without him.
  • Please if this guide has helped you out at all, contact me on Twitter @mangosquash and let me know. I’ll also answer questions there. Also, I’d love it if you followed my bot. I think the results are funny