As journalism seniors who will soon be graduating from the University of Florida, the job hunt has been on our minds frequently. We set out to create a Twitter bot that retweets tweets with popular hashtags in order to help journalists like us find job opportunities.
We used Python and Tweepy to make the bot and deployed the final product using Heroku. The following tutorials were helpful in creating a retweet bot.
We began by using tutorials by using the following tutorials:
- How To Create a Twitter App
- Before creating a Twitter bot, you must first create a Twitter app. This tutorial sets the foundation and explains how credentials work.
- How To Create a Twitterbot with Python 3 and the Tweepy Library
- This shows how to use the Tweepy library and accomplish tasks such as retweeting from a hashtag.
- 15.8: Heroku Deployment - Twitter Bot Tutorial
- This helped us get started with Heroku.
- Heroku Scheduler
- This helped us set up Heroku Scheduler so that the app could run on a regular basis.
We experimented with different hashtags to see which ones had the best results, checking in on the bot every few hours to make sure that the tweets we were sharing were relevant. While hashtags like #journalismjobs, #journojobs and #pubjobs yielded relevant results, others were not as pertinent for our followers. For example, #writingjobs had a lot of blogging and fiction writing jobs, and #mediajob (singular, not plural) was included in several tweets with conspiracy theories about the Parkland shooting. Sometimes the right hashtags also picked up blog posts about jobs, or threads where people shared tips or concerns about the journalism job hunt.
Next, we had to decide how often we wanted to tweet new job postings to our followers. Setting up a sleep function allowed us to space out the tweets. We initially programmed the bot to tweet every hour, but we soon realized that we were losing followers. After conducting a Twitter poll we decided to tweet once every six hours.
Though were were able to solve most of our problems through trial and error, there were still several limitations from the Twitter API that we had were not able to overcome. One issue we ran into was geographic location. After seeing tweets pop up about jobs from Europe and Asia, we tried to limit the tweets we gathered to only those from the United States. Even though we added a line of code to constrict the location of the tweets, a person in America could tweet about a foreign journalism job and that would still come up in our feed.
We had a blast making this Twitter bot, and we hope it helps you find your next journalism job! Please reach out with feedback: