We have wanted to make a Twitter bot for a while now, so we finally decided to do it at this year's BostonHacks! We always end up making something funny/silly at hackathons and this seemed like a great way to start.
What it does
This bot randomly generates a tweet once every specific interval of time (we set it to once every 4 hours for now but it can be as frequent as every 5 minutes). The tweets consist of a random sentence structure and random words that we wrote to fill in the blanks of the sentences.
How I built it
Challenges I ran into
We have never used Glitch before, so we had to figure that out from scratch. We also were unsure of how to configure the private keys that we got from our Twitter developer account so that it could actually tweet on its own. Figuring out how to format the json structure in our sentence file to actually create the sentences was also pretty tricky. After sending about 20 test tweets that were pulling the wrong variables and not what we were looking for, we were able to fix our issues.
Accomplishments that I'm proud of
We made a working Twitter bot that is automated with Uptime Robot, meaning we do not have to manually send HTTP requests in order to send tweets.
What I learned
We learned how to make a Twitter bot!
What's next for EatThisBot
We would like to add a feature that allows Twitter users to tweet at the bot and it will tweet a response back .