Programming for Marketers
How to Programmatically Acquire 50k+ Twitter Followers
In this lesson we’ll cover what you need to know to grow your Twitter following as organically as possible, without spending tons of hours on engagement.
In the basics we’ll cover tools to help with these things, and then in the advanced section we’ll show you how to build most of them yourself.
Let’s get started!
1. Basics – Tools and Techniques
The basics will be broken down into five sections:
- Following people
- Joining Conversations
Before you do anything to try to grow your following, you need to have a Twitter account that’s worth following.
That means that when someone sees you pop up in their feed they’re interested in learning more about you and can clearly see why they should follow you.
This breaks down to three areas: Content, Bio, and Pictures.
You have to create a unique voice on Twitter. I bet you don’t like following people who sound like robots, so you can’t sound like one either. Your word choice, the content you share, the people you retweet, it should all fit the voice of you and your Twitter account. If you like to swear, swear! Don’t feel like you have to follow any arbitrary rules about what to post aside from be yourself.
Some parts of the content to make sure you’re keeping consistent:
- People you retweet
- Articles you tweet
- Quotes you tweet
- Personal anecdotes you tweet
The first thing that someone will look at when you show up in their feed, on their followers list, or elsewhere is your bio. You only get 160 characters to tell the world who you are, so make them count! Don’t do a boring list like: “Entrepreneur, growth hacker, writer, marketer, lover of technology.” It sounds generic and boring.
Here’s Justin’s Twitter bio:
Co-author of Traction Book, the guide to getting startup traction. http://tractionbook.com.
It’s clear, to the point, and highlights the thing that he’s most likely going to be discussing on Twitter (since a lot of his followers came from the book). Make sure that you have a similarly clear Twitter bio that focuses on a couple of the most important things about you, while making you seem interesting and inviting.
Feel free to add a couple hashtags, but don’t over-do it. Hashtag soup is a big turn off and people will assume you’re going to spam them with articles they don’t care about.
Last, make sure that you have a location (people sometimes look for others in their area) and a URL. If you don’t have a personal site, you could put your LinkedIn or a link to your profile on a company page.
Last but not least, have a nice profile picture and header that show a bit of your personality. Keep it fun, and don’t make it overly promotional. If you’re using Twitter for a company then you should have the logo and a header that represents them. Feel free to use one CTA in the header, but don’t make it sound spammy or it will turn people off.
Alright, now that you have a great Twitter account, let’s build some followers for it.
1.2 Following People
Assuming you’re not a celebrity, published author, journalist, etc. you’re not going to have a ton of exposure where people will naturally want to follow you. That means that to build your following, you have to get in front of people and pique their interest. The most reliable way to do that is to follow people.
Anywhere from 10-50% of people will follow you back if you follow them. A small portion of them will be using auto-follow-back programs, but a lot of them will just follow you back because you seem interesting and you followed them.
But you don’t want to follow randomly! You should only be following people who would be good candidates for being interested in your content, and who would be most likely to follow you back. The best way to do this is to try to “steal” other people’s followers. Here’s how it works:
- Go through your followers, find people who write about similar things as you and who have a lot of followers
- Go to their page
- Start following their followers in the hopes that they’ll follow you back
But doing it manually kinda sucks. Instead, check out Tweepi and Manage Flitter which both offer services to make it very quick and easy to follow a lot of people at once, and to target who you’re following. For example, with the paid version of Tweepi, you can pick a user who’s followers you want to follow, then add filters like:
- Only people who are following more people than they’re being followed (these people will be more likely to follow back)
- Only people who’ve tweeted in the last few days (no inactive accounts)
- Only people who have at least 50 followers (less chance of spammers / totally new accounts)
- Only people who I haven’t followed / unfollowed before
- And so on
The other important step is to unfollow those who don’t follow you back. You won’t have a 100% success rate so it’s important to prune the people who don’t reciprocate. Tweepi and Manage Flitter can do this for you, and we’ll give you some code to automatically do it later. Or you could do it manually… but that’s no fun 🙂
1.3 Favoriting Tweets
Before we explain this, go to Twitter, and tweet something like:
Here’s what happened when I posted that:
Those 18 favorites showed up in less than 5 minutes–that’s an absurd engagement considering none of these people follow me.
Sadly it’s not really engagement. All of these accounts are using auto-favoriting scripts or programs to find people tweeting about certain topics, then favorite their tweets to hopefully get them to follow them.
Depending on your industry, this is a very effective tactic. It’s good in an area less inundated with “social media gurus” (for example, fine tea curation is probably low-competition) but it’s bad in the case above where everyone and their mother is running an auto-favoriting script. I’d say avoid doing it for things like social media, growth hacking, startups, and anything tangential to those.
Even though it’s not quite as effective as following people, it is nice because it doesn’t require you to inflate your following number. That would be desirable if you don’t want to look like you have an artificially high follower count just from doing follow / follow back.
Again, you could do it manually, but tools are better and we’ll show you how to write code for it later. In this case you want to use a tool like Twitfox. They’ll let you pick certain keywords to track, and then they’ll go out and favorite tweets related to those topics for you.
Try it for a bit, see how it converts, change your keywords around, and go from there!
1.4 Joining Conversations
Another way to gain exposure is to join conversations on Twitter. These conversations revolve around a certain hashtag, and if you look at a company’s Twitter page you can usually figure out pretty quickly if they do a regular Twitter chat.
Although you won’t get as many followers from Twitter chats, you will get your name out in the field and you might be followed by some high influence people. If you’re followed by someone with influence, they’re a great candidate for “stealing” followers from (a la 1.2) since when you follow their followers, their followers will see that the influencer they’re following follows you and assume that means you’re important and an influencer yourself.
There are also some conversations that aren’t hosted by companies but that come up organically. Search for certain hashtags related to your industry and see what comes up!
Those three things will be the main way you get discovered, but if you want to keep your followers, you have to not only have good content but well timed content.
First, go to Tweriod, sign in with Twitter, and see when your followers are most active.
Then, take that schedule, go to Buffer, and set your tweets to go out during those high-activity times.
Now so long as you post your tweets through Buffer you’re guaranteed that they’re hitting your audience when they’re most active!
Alright, so that’s the basics. Now let’s cover how you can do some programming and do all of this on your own (and for free!)
2. Advanced – Running Your Own Twitter Scripts
In this section, we’ll cover:
- Getting you set up with Python
- Installing the Twitter tools for Python
- Favoriting with Python
- Following with Python
- Un-following with Python
2.1 Getting set up with Python & Twitter’s API
Before you can use any of this code, you’ll need to have Python installed on your computer. Python is a very simple, easy to use programming language.
If you’re a Mac user, good news! It’s already installed 🙂 If you’re a Windows user, go to this link and follow the directions: https://www.python.org/downloads/windows/
Once Python is installed, you need the code for working with Twitter. Head to this link https://github.com/sixohsix/twitter/ then:
- Click “Download ZIP”
- Unzip it to your Downloads folder
Once it’s in your Downloads folder, go to Terminal (or Powershell if you prefer on Windows) and type in: “cd Downloads/twitter-master”
Assuming you left it in your downloads folder, you’ll now have “navigated” to the twitter-master folder using Terminal. “CD” tells the prompt where you want to go within your system, but it can only go down and up. If you wanted to go back up a folder, you could type “cd //” and then you’d be in “Downloads” instead of “twitter-master”. Stay in twitter-master though.
Now, in terminal, type “python setup.py install”. This will take the twitter-master code and add it to your Python installation so you can access it from other Python scripts. Don’t worry about all of the text that appears. Assuming nothing went wrong you should now have the Twitter tools installed!
Alright, you have Python and the Twitter tools. Now we just need access to the Twitter API. The API is the “Application Programming Interface” which is basically a fancy way to say “the data.” By having access to the API you’re really saying you have the ability to use Twitter as if you were on www.twitter.com, but with fewer birds and more lines of code.
Here’s how you get API access:
- Create a new folder (anywhere you want) to store the code for this project in
- In that folder, create a new file called “twitter_info.py” based on our example here: https://github.com/ProgrammingforMarketers/grow-twitter-following
- Now go to https://apps.twitter.com/ and click “Create a New App”
- Put whatever you want in the name, description, and URL. Don’t worry about the callback
- Once you hit accept, go to “permissions” and set them to “Read and Write” not just “Read Only”
- Now go to the “Keys and Access Tokens” tab, and generate a new access token (there will be a button towards the bottom)
- Once you have that, you can copy over your Consumer Key, Consumer Secret, Access Token, and Access Token Secret to the file you created, twitter_info.py, based on our set up
- Save the file, and you’re done! Your computer is now set up to work with your personal Twitter account
2.2 Getting the Code for Automating Twitter
Now the real fun can begin. We’re going to download a Python package that someone was kind enough to open source for us, so that we can manipulate our Twitter accounts without having to build everything from scratch.
You can find the original code here: https://github.com/rhiever/twitter-follow-bot but we’re going to recommend you download our slightly modified version of it which will allow you to keep your personal Twitter info in the separate file you created. This is a good practice in case you share the code with someone else, since you don’t want to give them access to your Twitter account. Go here to find our version: https://github.com/ProgrammingforMarketers/grow-twitter-following
First, hit “Download ZIP,” unzip it to your downloads folder (unless you did this already earlier for the “twitter_info.py” file) and then copy the “twitter_follow_bot” and “sample_twitter_codes” files to the same folder as where you put your “twitter_info.py”
And that’s it! You can now run a bunch of different functions to automate your Twitter account, just by changing what’s “commented out” in the “sample_twitter_codes” file. We’ll explain in the next few sections.
2.3 Auto-Favoriting with Python
Now instead of having to pay for someone else’s service, you can run your own auto-favoriting robot right from the command line.
Here’s all you have to do:
- First, open “sample_twitter_codes” and un-comment #3 (we explain commenting in the file)
- Then, open your terminal and navigate to where you stored the .py codes using the same “cd XYZ/XYZ” syntax from before
- Last, type in “python sample_twitter_codes.py” and hit enter! You’ll start favoriting everything related to that topic to a certain limit.
2.4 Auto-Following with Python
So this starts off the same as for auto-favoriting, but you’ll either un-comment #1 if you want to follow based on a phrase, or #2 if you want to follow someone’s followers. Once you’ve uncommented one, save the file again.
Go to terminal, navigate to the folder, and type in “python sample_twitter_codes.py” and you’ll start following!
2.5 Auto-UnFollowing Non-Followers
We won’t go too in-depth with modifying the python files here, but we did include the function to wipe out all of your non-follow-backs. You can un-comment and run #4 if you’re feeling aggressive 🙂
And there you have it! You now have a set of Python functions set up for your personal (or company) Twitter account that lets you automatically favorite relevant tweets, follow people who would be good leads for you, and even unfollow people who aren’t following you back. Go brag about it on Twitter!
There’s one thing missing though. You still have to manually run these codes every day, which is still very easy but not quite ideal. We wrote up a short “bonus lesson” on how to make these codes run automatically for you as frequently as you want. If you’d like to learn how (don’t worry, it’s easy!) and you can get it right here by sharing this post now!
You now have the tools to go out and collect a massive Twitter audience with very little work on your part. Go out, conquer the world, and let us know if you have any feedback!
Your Friends in Technical Marketing,
Justin & Nat