Regardless of your experience level, it is advised to read this section to guarantee correct configuration of your application. It is incorrect settings in the Facebook Developer application that tends to be the cause for malfunction. This can result in many hours of lost time trying to fix it.



Choose application name

Open Facebook Developer application and press button 'Set up new application'. The screen as shown below appears. Here you enter the Application Name, select Agree, and then press Create Application to start the development process.

create facebook application



Setting Website options

Facebook Site URL has to be set for Facebook Connect web applications, but also for Facebook iFrame applications. Forgetting to set this option is the most frequent mistake. Select the Web Site section and set the Site URL. The picture shows setting for working on local host, i.e. on development machine. It has to be changed to server URL once the application is deployed on server. On the same picture are Application ID and Application Secret. Please copy these values to use them later in application code.

facebook site url



Setting Facebook Integration Option

Select the Facebook Integration section inside Developer Application and select all options as shown on following picture. This setting is used for Facebook iFrame application and it is not necessary for Facebook Connect Website. First choose Canvas Page. It has to be unique and easy to remember as it is something like domain in Facebook world.

Now set Canvas URL. The settings from the picture are for the application which works from IDE on your local server at port 81. Important - be sure that port is chosen depending on setting on your local server. When you publish the application on your hosting server you should change the Canvas URL on domain of your server, i.e. full URL of hosted application. The Canvas URL has to be the same as Site URL (from Website section). If you change the Site URL, be sure to change the Canvas URL also or your application will not work anymore.

facebook integration


Next: Install Facebook Connect PHP Toolkit in PHP project