Gist Power Tip: Export Facebook Page Fans

by Adam Loving on September 28, 2009

October 13th 2011 update: This blog post is out of date. Recent Facebook changes broke the script and I’m working to fix it. Please enter your email to be notified when the new export script is available.

Your email ==>  







Businesses that embrace social media are faced with the challenge of communicating with customers on Facebook, Twitter, and other social networks. While philosophically I think this fragmentation is good, it is critical to be able extract, evaluate, and communicate with your user base wherever they may find you.

Facebook member and fan lists are not very portable. Even within Facebook, it isn’t obvious whether a Facebook Group or Facebook Page is better for communicating with customers. Gist is an emerging as a social Swiss Army knife (and social CRM) that can help solve this problem.

One thing that has always annoyed me about Facebook Pages is that there is no way to export fans. I’ve discovered workable hacks for downloading the member list from both groups and pages.

For Facebook groups, you can use the handy Export group members to CSV application. It uses the Facebook API to export members in to a handy Comma Separated Value file, which you can in turn import into Outlook or Gist.

Export Facebook group members

Using the EGMCSV app, select your group and the attributes “Facebook ID”, “Full name”, and “Picture URL”. Once you have a CSV file, edit the column names to those below.

  • facebook_id
  • Name
  • facebook_pic_big

These are undocumented CSV columns that Gist supports. They are required to track that the contact came from Facebook. Gist will automatically download their photo.

Import CSV into Gist

In Gist, click the “Account” link, then “Other/CSV” under “Connect More Accounts”. Once Gist has processed your file, contacts will start to appear.

Gist contact import

Getting fans from a Facebook page is not yet supported by the Facebook API. Luckily, the Facebook Web interface uses a simple AJAX/JSON call to supply the data when you view the page.

Gist Fans

My strategy to set this data free was to sniff the network traffic with the Wireshark tool, then replay the HTTP calls with a ruby script. The script below will iterate over the page’s fans, save the pages as JSON in plain text files, then load the text files and convert them to CSV files in the format we used above for groups. Note that if you run this you will need to substitute the value of your cookies and the form values in the HTTP post body. This insures you are authenticated as yourself when you connect to Facebook.

FacebookFanExport

Here is the text-friendly version of the Facebook Page Fan export script. I didn’t try this with pages for which I am not the administrator. I don’t see any reason why this wouldn’t work for your competitors’ fans.

The net result is a consolidated list of fans (prospects and leads) in Gist.

Gist People List

Gist will help de-dup contacts whether they originated from Facebook or Twitter. You could for example, use Gist to identify customers from your Web site that are on Twitter, and generate a special Twitter focused mailing to them. Gist has a ways to go to make this easier (bulk contact tagging by import), and also does not yet automate the communication side of the process (send a message to a person regardless of what network they are on).

wrote this post.