Ryerson & Brock Twitter Bot

Ryerson & Brock Twitter Bot

Programming

I wanted to get students more involved on campus. Both Brock and Ryerson use an event-planning system that students must visit to see events, so I decided to bring the events to them, with a Twitter bot.

Project Completed: February, 2017

Approximate Time: 1 week

Created With:

Improving on another bot

Originally built for Brock University, this twitter bot was designed to bring events to the students, rather than to expect students to go looking for events.

@ryersonevents is based off the same principles, with refactored, more efficient code, and an open source base scalable to any institution using CollegiateLink software.

 

How It Works (Non-coders)

Ryerson organizations enter events into the connectRU platform, and the platform provides a publicly accessible data (RSS) feed. Every hour, the bot checks to see if an event is starting with in the next hour. If it is, the bot tweets the name, location, and start time of the event, as well as a link to view more information on connectRU.

If you want to stay more connected to the Ryerson community, simply follow the account; it will do the rest. (This is an unofficial Ryerson account).

 

How It Works (Coders)

The bot is written in PHP and is open source (repository available here). Scheduled via a cron job every hour, the bot imports and parses an RSS feed provided in the settings, and then interacts via oAUTH with a twitter application to post tweets; with the exception of the grep functions to find locations and times within the description XML tag, it’s all rather simple.