Frankly speaking, I got lost a little bit when I first searched for information on Facebook application development. Different terms are used in making references to the same thing (and probably I am doing this too).

The PHP SDK that we are going to learn here is sometimes referred as the PHP client library (but that is not very common). Anyway, to be exact, this PHP SDK is the one that Facebook provides official support and locates in http://github.com/facebook/php-sdk/.

For details, please refer to my article "The official Facebook PHP SDK" posted earlier.

 

Approach Used in this "Learning PHP SDK" series

While we have learnt how to develop Facebook applications by using the old PHP client library and FBML already, I think it would be good to learn the PHP SDK by migrating "Our 1st Facebook App" to use the PHP SDK instead of developing another application from scratch.

So, if you haven't read the "Learning FBML" series, I suggest setting up "Our 1st FB App" by using the source code package that I have released and then going through the tutorials quickly.

To avoid confusion, I will continue to use the term "Our 1st FB App" to refer to the application that we have developed earlier based on the old PHP client library and FBML. And for the migrated application, I will refer it as "Our 1st FB App on PHP SDK".

 

Setting Up the Development Environment

While we are developing web app, the development environment is simply a local directory that contains the files (php file, SDK file) that we are going to upload to our web application server.

Assuming your local directory for "Our 1st FB App" is under \web_dev\facebook\demoapp. To setup the development environment, simply perform the following steps:

Your final local folder would be something like this:

Facebook dashboard header

After setting up the local folder, I suggest registering another application in Facebook. Please note the followings for your application settings:

That's all you have to do at this moment. We will start migrating the application to use PHP SDK in the next session.