Adam Green
Twitter API Consultant

Lead Generation: Automating quality control using a follow signature

by Adam Green on February 2, 2014

in Lead Generation

As I said in the previous post on lead generation, it’s easy to find thousands of leads for any subject on Twitter. Assuring the quality of these accounts, however, is a time consuming task. What is also needed is an automated test that will filter out the highest quality leads.

An effective signature is a user who follows many expert accounts on the desired subject. Let me offer a concrete example. If I’m looking for users who care a lot about sushi restaurants, I would start by identifying the most influential accounts who tweet about sushi. This will take some time, but once I have a list of 100 sushi experts, I can use that to screen anyone and measure their own interest in sushi.

If someone follows one or two sushi experts, it may be a coincidence, or they could just be a spam account that accidentally followed sushi accounts. A user who follows 10 to 20 sushi experts is probably interested in sushi themselves. If they follow 50 or more sushi experts, they are a sushi freak, and will click every link presented to them that will lead to that ultimate 10 in sushi restaurants. For the record, my ultimate 10 is the sushi bar in Harrods in London.

Here is a technical perspective on how to implement this model:
1. Create a table, we’ll call it experts, that contains the user_id and screen name of 50 to 100 experts on any subject.
2. Create a table, we’ll call this one leads, that contains the user_id of your unqualified leads. Along with any other data you need about the lead accounts, include a expert_count field in the leads table, which will end up containing the number of experts they follow.
3. Loop through each of the leads, and collect the accounts they follow with the /friends/ids API call.
4. Loop through each of the friends of a lead, and test to see if they exist in the experts table. If a match is found, increment the expert_count field for that lead.

Unfortunately, /friends/ids can only be called 15 times every 15 minutes, but if you set this up with a cron job, you can screen 1,440 leads per day. After a day or two, you can sort the leads list to find those with the highest expert_count. These will be your best leads. You can only follow a few hundred accounts per day, so this process will quickly start giving you more than enough leads for a daily follow campaign.

This type of system can be run continuously. You can have a data collection script based on the streaming API or REST API that is steadily adding new accounts to the leads table, a screening script that is qualifying them as described above, and then a script that allows a user to follow the best leads by hand.

This is pretty cool once you get it running, great leads just start bubbling up to the top of the leads table when sorted by expert_count descending. Whenever I create a system like this, I am amazed at the quality of accounts that emerge. Twitter is the best lead generation system ever created.

Remember, automated following is forbidden, so this final step of actually following someone must be done manually, although you are allowed to create a web page that makes each follow a simple click. Once someone is followed, they can be flagged or deleted, so they aren’t offered for following again.

Leave a Comment

Previous post:

Next post: