GK Logo 003 350 x 100

In my previous twitter posts (you can see my series of Twitter posts here) I have discussed various things that I have done (or am thinking of doing) to try and get a twitter service up and running, where I tweet on a certain subject for 24 hours, and then I change to something else. That is now all working and seems to be standing up pretty well. You can also subscribe to the service, and I’ll tell you when I start tweeting about your subject(s) of interest. In my last post I was saying that registrations are slow; in fact non-existent.

I mentioned a few ideas about how to attract new followers. One of them was ‘I have been investigating how to collect potential twitter users and then tweet them directly about the service. In fact, the twitter search API provides this type of functionality and I’ll be looking at this soon.‘ Over the past couple of days I have been working on this and I think I have a system that is now just about up and running. It works like this.

I have a cron job (that is a piece of PHP that runs every so often) that tries to identify potential followers. It does this by looking for previous tweets that includes the term that I am currently tweeting about. That might be, for example, ‘Vehicle Routing‘, ‘Healthcare‘ or ‘Bin Packing‘. The twitter API (Applications Programming Interface) actually provides this functionality via its search engine (see here). Once you have received a number of recent tweets that mention your search terms, it’s an easy task to parse that text to be left with just the twitter usernames.

Once I have the usernames, I store them in a database. As well as the usernames, I also store the time I have seen from that person, the number of messages I saw from that person, the last time I tweeted them and the subject that I was tweeting about at the time. When I add a new person to the database, I set their last contact date as four weeks ago (for reasons that will become clear in a moment).

I run this cron job every four hours, so that I do not keep picking up the same messages again and again (and thus incrementing the count of the number of times I have seen the user, when it is, in fact, the same message).

I have had this running for a couple of days now, so now I can start contacting people who might be interested in my twitter feed.

To do this, I have another cron job. At the moment, this runs every thirty minutes, but that is because I am still testing it. It will eventually go to about four hours as I don’t want my twitter feed to get too full of these messages. When I run the job, I extract all the tweets for the current subject and sort it by the number of times I have seen that person. This is on the basis that the more somebody has tweeted about the subject themselves, the more likely that they will be interested in what I to say. I then go through each of these users and check the following:

  1. Do they follow me already? If they do, I ignore them as it is pointless asking somebody to follow you who already is.
  2. Have I tweeted them in the past 30 days? If I have, I ignore them, as I don’t want to annoy people by continually tweeting them. Hopefully, they won’t mind once  a month, but if I do get complaints, I’ll set up an ignore list, so I don’t tweet people on that list.
  3. Have I seen them at least twice? I want to know that they have tweeted at least a couple of times on a given subject. Even so, this is not foolproof. I saw somebody tweet twice about bin packing. They were actually tweeting that they have been packing for their holidays!

If I can find somebody who fulfills the three criteria above, I send them a tweet. Hopefully they will be interested enough to follow me.

So, this is now live. I still need to put in a few things. For example, I need to keep the database tidy, so I need to have some way of deleting records, but that can wait for a while.

It’ll be interesting to see if this actually just annoys people, or does increase my number of followers. I’ll let you know.

 

One Response