Facebook Open Sources Insights Script For Developers

By Nick O'Neill Comment

Facebook Insights IconIf you are a developer that read about yesterday’s Facebook Insights announcement but want examples of tools that can be implemented, look no further than Facebook’s open source Insights API sample that was released yesterday. It’s a short Python script which lets a user download the analytics from their Pages, applications, and websites into a CSV file. It’s pretty basic, but it illustrates the potential of the new Facebook Insights.

The application, which runs on Google AppEngine, uses the Facebook Graph API to pull data from Facebook. The level of insight is pretty impressive. For example, Facebook makes a distinction between the number of Page stream views versus unique views (which I would assume is the number of users that viewed your stream story). While it doesn’t appear as though the new Insights tools are rolled out to all users yet, developers can immediately start leveraging the Insights product for their own internal use, or to build third-party analytics services.

I wouldn’t be surprised to see numerous analytics packages immediately start offering Facebook Insights data directly within their products. The process flow for acquiring OAuth tokens functioned somewhat strangely on my iPad, but that could have simply been a result of using the iPad. Regardless, having code to play with is useful for any developer looking to figure out how the new Insights API functions. If you want to access the new Insights API you can find it here on GitHub. You can also view a demo of the script here.

-Social Developer Summit Banner-