We the People Social Media Bot


The White House provides an online petition platform for gathering signatures for causes that citizens feel are especially important. If they reach enough support, the White House promises to respond. However, aside from the official twitter account which only tweets new White House responses, there isn’t a good discovery mechanism making it hard for some good petitions to reach the signature threshold. Of course, you can go directly to the page and view recently posted petitions, search, and filter by categories, I know that I don’t really want to do that, and I know I’m not alone. I don’t need yet another page to check every day. I’d rather have the newest petitions and responses show up in my feed on the sites that I already use.

So I made it happen. To accomplish this, I created a node script that queries the official We the People API to look for new responses and new active petitions which are then posted to Facebook, Twitter, and Tumblr. Previously posted responses and open petitions are cached using redis. This is hosted on Heroku and ran every hour as a scheduled job.

Source: github - Technologies Used: Node.js, Heroku, Redis - Type: Node.js Script - Date: February 2015