Skip Navigation Links

Using Project Zero to write your Facebook application in PHP

Posted by cjthorne on November 2nd, 2009. Other posts by cjthorne

We have recently added the last of the PHP functions needed to run a PHP Facebook platform application on Project Zero. To get started writing my own Facebook application I simply followed these steps:

  • Download the latest Project Zero development driver which now has all the support you need (use the Monza release or later). You will need to have public internet access to your Project Zero application (because the Facebook website needs to call your application), and one way to achieve this is to use the Amazon EC2 WebSphere sMash development image updated to the latest driver (see below for details).
  • Start appbuilder and create a new sMash application.
  • Download the latest Facebook PHP client library from the Facebook website. Unpack this file and copy all the files in the /php folder to <myapp>/app/scripts. This will allow your application in <myapp>/public to find the PHP client library.
  • Use the Facebook getting started instructions on the Facebook website to write your application

If you see a problem with a missing http_build_query() then you do not have the latest development driver.

Getting the WebSphere sMash Development image and updating to the latest experimental level

There is a good blog post about how to get a WebSphere sMash Development image on an Amazon EC2 image. After following these instructions I created a new application and then I wanted to use the latest development driver from Project Zero (note that this is not suitable for production use but is good for trying out the latest features).  To do this I went to the command prompt in the appbuilder and ran the following:

  • zero modulegroup create monza https://www.projectzero.org/zero/monza/latest/repo/base https://www.projectzero.org/zero/monza/latest/repo/samples https://www.projectzero.org/zero/monza/latest/repo/modules
  • I can now create a new application with the modulegroup called ‘monza’ which will have the latest development code.

Comments are closed.