So after the f8 2010, Facebook opened up it’s new Apis. I started to tinker with the new Facebook Social Graph API.

Every object in the social graph has a unique ID. You can fetch the data associated with an object by fetching

Facebook also updated their policies to allow caching of their data to reduce API hits to their system. Kind of makes sense as people were probably storing data anyways, and reduces their server loads. A new service they now offer are Real-time Graph subscriptions. This service allows you to subscribe to graph objects and in near real-time ( approx 1 min or less ) your calllbacks get pinged when data changes in their graph. It’s pretty cool and I have setup a basic prototype for testing.

To make this work I had to do a few things.

  1. I turned on error_log in my php.ini, so I had a place to capture the callback and follow the real-time updates
  2. I also had to install the pecl_http extension.
  3. pecl install pecl_http
  4. on Ubuntu I needed to do sudo apt-get install libcurl4-openssl-dev first
  5. add to /etc/php5/apache2/php.ini
  6. restart apache
  7. checked phpinfo()

My basic proto is working :), next I will be integrating for use in our game