Informing publishers of my tweeting activities

In my previous posts on twitter I have been describing (in general terms, I will do some posts on some of the more technical aspects soon) how I have automated some of my tweets. The system, in brief, tweets scientific articles on a random basis – doing about twenty tweets a day. Each 24 hours, I change the topic so that if people are interested they can just follow me when I am tweeting about a topic that interests them.

INFORMS, in particular, have been very kind to retweet some of my tweets. I have not checked but, I suspect that the articles they retweet are those that are published in INFORMS journals!

This made me think that I should be a little more proactive in telling the publishers what a good job I am doing for them. As I update my database with articles that I tweet, I have started to add a field which indicates which publisher they come from. At the moment, the publishers I have on file are IEEE, INFORMS, Taylor & Francis, Science Direct and Wiley. All of these also have a twitter account, with the exception of Wiley. Well, maybe they do, but I cannot find it.

Over the past couple of days I have been implementing a system that chooses one of these publishers at random and also chooses a time interval to query. For example, it might be the last 3 months, the last 7 days, the last 11 months etc. It is now a simple matter to run an SQL query from PHP to extract how many tweets I have done for that publisher over the relevant time period. I can then format a tweet so that it says something like

@TandFRef You may have noticed us tweeting your papers? We have tweeted 147 of your papers in the last 29 days

I can then use my automatic tweeting system to post the tweet to twitter. To try and keep things looking fresh, the format of the message I post is randomly selected from a number of templates I have defined. Along, with the variation of the intervals I use, I hope that the publishers will find it useful and not too repetitive.

Of course, one of the ideas behind this is to raise my profile with the publishers, and also on twitter generally but, in doing so, I hope that people find the information useful. I am conscious that it could become intrusive though, so I only do a couple of these tweets a day. Hopefully the publishers will not mind. If they do I can, of course, remove them from the service.

In the future, I am thinking of extending the system so that I can tell people how many tweets I have done on (say) vehicle routing in the past n days/months. I could even combine it with the publisher information so that I can tell the publishers how many of their articles I have tweeted over the past few days/months on a given topic. But I’ll let this new system bed in first.

Improving/targeting my Twitter Feed

Some of you might subscribe to my twitter feed you’ll see that I tweet journal articles on a regular basis. In fact, at a recent conference, I was taken to task (in a nice way) about how could tweet so often and, more to the point, how I could have tweeted whilst giving a presentation!

Actually, this is an automated procedure (punctuated with personal tweets on a regular basis). The automated tweets are proving to be popular, at least from the Re-Tweets and the favourite’d tweets.

However, I am aware that not all my tweets are of interest to everybody, all the time. That is, some people might be interested in the Vehicle Routing Problem but don’t really care about Personnel Rostering. There is not a lot I can do about that (if you follow me, you follow me – there is nothing selective about it). I suppose I could set up an individual account for each domain (Vehicle Routing, Travelling Salesman, Personnel Rostering etc.) but that seems a little excessive; not least of all from a maintenance point of view on my part!

Thinking about this, I came up with the idea that I could tweet about one particular topic in a 24 hour period and then change topic for the next 24 hours; and so on. In this way, you would only need to pay particular attention to my twitter feed when you knew I was tweeting about something that you were interested in. The idea is still very much in my head at the moment but I have some ideas about how I would implement this (with a sortof of draft almost done – but much work to do), which I’ll share with you in due course.

A further stage would be to allow people to register for certain domains and, when that domain is selected to be tweeted for the next 24 hours, then I could @message and/or email the person in order to tell them to pay extra attention to my twitter feed for the next 24 hours. But this would test my PHP/SQL skills beyond what they are at the moment, but that is not necessarily a bad thing.

As I say, mostly still in the idea stage at the moment (with some test functionality under development), but definitely something I want to take forward.

More soon, but you might also be interested in my series of Twitter posts, available here.

Tweeting from PHP

For a while I have been looking at ways of tweeting regularly (you can see my series of Twitter posts here). Not to annoy people, but just to have a presence a few times a day. Of course, I hope the tweets are also informative.

A quick google will find many tools that are available to do this but, in my view, they all have their shortcomings. Some want payment,  some you have to have your computer on all the time, some are difficult to use, others only have limited functionality and others did not seem to work at all.

Another problem I found was that there was limited scheduling available. For example, you could send the same tweet every n hours or days. You generally had to pay get anything more sopohisticated.

At one point I was running a number of automatic tweet services, just to try and get the service I wanted but it was not really working and took a long time to maintain.

So what did I actually want?

Nothing fancy. I just wanted to send interesting tweets, at “random” times and be able to configure how many I send each day. I was thinking one every couple of hours; nothing too much.

After some recent sucesses in learning more about PHP and SQL I decided to investigate if there was a better option. A solution where everthing could be hosted on my own domain so that I was in full charge of the system, as did not have to rely on (or logon, or pay for) other services.

After some searching I found a PHP class at The class in question is called twitter-auto-publish. This provides a simple set of tools that enables you to easily post a tweet, as well as providing other functiality (which I have yet to explore).

To post a tweet is very simple. The following lines of PHP are all that are required (and the presence of the require libraries – but that is just a simple case of copying the files to a relevant folder).




$user=’your user name’;

$pass=’your password’;

$rochak=new twitter_auto_publish();


echo ‘Tweeted: ‘ . $msg; // this is the tweet you wish to publish



Most of it is quite obvious as to what it does, perhaps not how it does it though! The important thing, as far as I am concerned, is that this gives me the basis on which to tweet. Now I have that, I am able to starting thinking about how to exploit this to develop a system that does what I want it to.

More later.