insights – Stay N Alive

More "Insights" on the Facebook Open Graph API Surface

With Facebook’s F8 Developer’s conference right around the corner, there is a flurry of activity happening as the Facebook team rushes to prepare for many launches at the Conference.  While I know more than I am saying, there is some evidence in plain view, open for all that we know for sure will be launched at the conference which you should prepare for.  Specifically, I’ve already shared information about Facebook’s XFBML tag to enable any website on the web to be “liked” and shared amongst a user’s friends.  While not currently functional, this information was made clear in Facebook’s Open Source Javascript Client libraries available here on their GitHub open source repository (and available to all).  There is much more those libraries reveal though (some which have been there for months), hinting at what could very well become a “Facebook-less” connection to the entire web, making it much less necessary to go back and forth between the Facebook.com website to interact with Facebook on a day-to-day basis.  Here is what we know:

There will be a tag that website administrators and developers can stick onto any website that enables a live stream of just that website’s activity on Facebook.  According to the check in on GitHub, the tag accepts the following parameters:

- site (string): mandatory, site url (ie : facebook.com)
- activities (int): number of activities to display.
- width
- height
- header (boolean): indicates if the header should be displayed or not.

Assuming I understand it right, if you use the sample from the GitHub check in, code like the following would display an activity stream for all posts to Facebook from the CNN.com website:

and 

It’s quite unclear what these are going to do exactly.  One has to expect it is something like the Meebo bar, which puts a bar at the bottom of any Connect (or Open Graph API) enabled website.  The two seem to work together, and, from the code, the fb:connectBar tag seems to prompt each visitor with text that says,

“Hi {firstName}. {siteName} is using to personalize your experience.”

There is an option to click to learn more.  My guess is that is just a way for website owners to spread more word about Facebook Connect to their visitors.  I’m assuming uses as part of the bar website owners place at the bottom (or elsewhere) of their website.  Right now it seems the way to implement is to just place “” or “” in your website somewhere after calling the Facebook Javascript libraries.

Insights for Websites

Perhaps the most intriguing part of the and tags is that they both make a call to a new API method, FB.impression.  The interesting call in the Open Source Client libraries source code is:

FB.provide('Insights',{impression:function(e,a){var b=FB.guid(),g="//ah8.facebook.com/impression.php/"+b+"/",c=new Image(1,1),f=[];if(!e.api_key&&FB._apikey)e.api_key=FB._apikey;for(var d in e)f.push(encodeURIComponent(d)+'='+encodeURIComponent(e[d]));g+='?'+f.join('&');if(a)c.onload=a;c.src=g;}});

In the summary for the check in on Github, they state, “Add new method – FB.impression – for pixel-based impression tracking.”  So, based on that, it would seem that whether released at F8 or not, there may be an Insights component to this OpenGraph API released.  Insights is the product used by Fan Page owners on Facebook to track activity on Facebook Pages.  Ideally, by enabling the above tags, it could enable website owners to gain added social graph data in addition to impressions, visits, and page views for each user that visits their website, including demographics, ages, nationalities, and even names of users.  That would be a very powerful statistics engine, unrivaled by the likes of Google Analytics and other solutions!

While none of the above work outside the Facebook, Inc. Firewall, it is exciting to know they could be coming.  My expectation is that on or around F8, Facebook should turn on the backend code that powers these, and then, the OpenGraph API will be available for all.  While this stuff is all very powerful, I can’t help but wonder if this is the tip of the iceberg.  None of this encompasses open standards of any kind, yet David Recordon and the Open Standards team at Facebook seem to still be preaching “open”.  I’m assuming there will be something very open and distributed, unreliant on Facebook alone, about all of this coming up this F8.  I can’t wait to see what happens.  Keep watching here, as there is even more out there in the open surrounding the Facebook API that I think is pretty cool.

If you’re coming to F8 on Wednesday, come by and say hi to me!