Getting Started with OpenFuego News Bot

Logo of Nieman Lab FuegoOpenFuego is an open source bot from the Nieman Journalism Lab that curates a news feed using 10-15 Twitter users in a desired topic area. The people those users follow are monitored to determine the links that are most interesting to them and a database is created that can be a backend for other sites and services. The software powers Fuego, a web site and Twitter feed of journalism-related links.

I want to run a Twitter bot that shares new software and programming links. Today I downloaded OpenFuego from GitHub and installed it on a new LAMP server with the latest versions of Apache, MySQL and PHP (the language OpenFuego is written in). A file called config.php must be edited before the bot is run for the first time.

The Twitter users who will form the nucleus of the bot’s work are called authorities and the people they collectively follow are called a universe. For authorities I selected these users:

I added these nine usernames to the configuration. They were chosen because they cover software and programming and follow a reasonable number of users. The latter criteria is based on a recommendation by the software’s creator. OpenFuego looks at a maximum universe of 5,000 accounts followed by the authorities. If one authority follows 2,000 that’s already 40% of the total. My authorities follow 3,605 users (though the actual size of the universe is lower because they follow some of the same users).

After the authorities were added, config.php required credentials for a MySQL database and user. I created both for use by the bot.

Next, the configuration needed my Twitter username and a new app on Twitter. Apps are created on apps.twitter.com, which I think requires an account with a phone number but is otherwise open. Every app has a consumer key, consumer secret, access token and access token secret. I created an app for the bot and added these settings.

OpenFuego configuration also takes API credentials for the link shorteners Bit.ly and Goo.gl and the service Embed.ly. These are optional. I don’t know yet what the bot does with these services, but I had accounts at Bit.ly and Goo.gl so I provided those details.

With the configuration complete, I ran the program that launches the bot at a command line: php fetch.php -v. The -v option makes the output verbose.

The bot ran without error, successfully creating the database, adding the authorities and creating process ID (PID) files for two scripts as they executed continuously.

Unfortunately, no tweets showed up in the database. OpenFuego kept reporting that it found no new updates on Twitter.

The bot is not making successful SSL connections to Twitter over the socket it uses to receive them. It also doesn’t report enough of what is going on to make any determination about the problem.

I could not get it to work. Instead of giving up, I created this blog as a place to document my work towards a solution.