The role of online social media continues to grow in importance for political organizations. Facebook, MySpace, YouTube, Flickr, Twitter, and dozens of other sites need to be managed, tracked, and integrated. This takes a lot of staff time, but luckily these services continue to expand their support for external programs that can manipulate data or perform actions. APIs (application programming interfaces) allow different websites or computers to talk together and do things in the background. Even sites which don't provide official APIs can often be automated using third-party tools.
In this article I'll show one simple script that uses Python and a third-party library (libgmail) to load a file of emails into gmail contacts. It's very common for web applications to support interfacing with gmail accounts to add users, so once your emails are in gmail it's simple to import them into Flickr, Twitter, etc.
Why do this? Well for one, it helps organizations bootstrap their social media relationships. Normally your email list will be the largest medium for contacting members, so syncing that list into other services can really jump start your campaigns there. Rather than start from scratch you can build off your existing members, connect with them in different ways, and expand your online communication offerings. Even better, integrate social network synchronization into your data workflow: e.g. on a nightly (or hourly) basis sync new email subscribers into gmail, then sign into your socnets and add any new accounts you find. The "add any new accounts" step can be automated as well and will be explored in a later article.
Python is the scripting glue for gmail_add_contacts.py, and I use libgmail to interface with Gmail. Libgmail requires the mechanize module if you haven't already installed it, but if you have easy_install it's a single command. Here are the commands (I'm on OS X):
Example output:
It will take a while to load the emails into gmail, but once they are there it's just a few clicks to add all your members on Flickr, Twitter, or any other service that can import from gmail contacts!
I tested this concept by loading 5,215 volunteer records into gmail. Of those, 590 could be found on Twitter (11.3% match rate) - not too shabby. And because the contacts are stored in gmail, I can always import again, say once a month, and add members who have recently joined. It would be interesting to see people try this for their own members and see what the match rates are for different services and organizations.
Comments
Have you seen any pushback
Have you seen any pushback from users on using some of the integrated bells and whistles through their Facebook page, twitter account, etc? I’m starting to see a shift in what people want – or trust – in apps and plug-ins. We’re trying to encourage our partners to go to their people and engage them where they are, instead of assuming they have to drive people back to their own site/blog. Feeding our current “me-centric” obsession.
Your discussion on volunteers on Twitter was very interesting! That's a MUCH higher match rate than I'd expect!!
Hmm I don't think we've seen
Hmm I don't think we've seen much user push back yet, but we don't have a lot of staff time to put to online organizing right now (hence some of my interest at automation). But yeah, definitely agree that engaging the users where they are is ideal, while also building out a site that provides solutions and encourages users to stick around.
Sadly on the match rate I don't yet have a script to extract which users were actually matched, otherwise I could look at the demographics of matched users. We have a young, online-oriented volunteer base so I can see why the match rate is pretty good.
Post new comment