Inspiration

Originally, we wanted to create a website that would allow users to automatically email their Senators and Representatives about issues they cared about. However, after doing some initial research, we realized that this project was much larger in scope than we had originally realized, and well outside each of our experience levels. We threw around some ideas about building a Twitter bot after watching some tutorials on YouTube, when Katherine had the brilliant idea of providing a separate Twitter account that people could follow that contain Donald Trump's tweets (because really, it's like a trainwreck that you can't tear your eyes away from), but doesn't give him any satisfaction from interactions such as retweets (of his ridiculousness) from his personal account.

What it does

Quite simply, it tweets a quote of the President's tweet followed by the hashtag #TrumpVerbatim in real-time.

How we built it

We followed a tutorial by The Coding Train on YouTube about how to create a Twitter bot using Node.js and Twitter's own API's. From there we gained the knowledge to get tweet data in real-time and post remotely to our account from a Node program. We've hosted our code remotely on a server through Amazon Web Services so that the bot can run continuously, ready for the next tweet to post.

Challenges we ran into

A huge issue that we ran into was part of how Twitter's Streaming API handles following users. This service provides all tweets, retweets, and replies created by the user (in our case, Trump), but it also includes all mentions NOT created by the user. While testing with our personal accounts, it was no issue since we were never directly mentioned by others; however, once we hooked our program up to Trump's account, our bot immediately started tweeting out any and every tweet that was directed toward Trump ("@realDonaldTrump ...") and trust me, there were A LOT. It got to the point where our bot's account got locked, and I was convinced we were hacked. All is well now though...if only Trump would tweet again!

Accomplishments that we're proud of

Walking into our first hackathon, we weren't even sure if we would be able to walk away with anything! We're so proud to have developed this simple bot :)

What we learned

We learned a LOT about how Twitter works and how Twitter handles its data, as well as how to utilize API's!

What's next for Trump Verbatim

At this point, our bot only quotes the text from the original tweets. In the future, we'd like to include functionality that will include images, videos, and links, as well as retweets in order to replace the original account as much as possible.

Share this project:

Updates