HomePHP Facebook PHP API Applications: A Second Look
Facebook PHP API Applications: A Second Look
This is the second part of the Facebook PHP API tutorial. The first part ran on August 11. It covered the most basic features, such as adding the basic Facebook “Like” button, the “Recommendations” plugin and registering your applications in Facebook to get an Application ID and Secret key. In this part, we'll delve deeper.
Specifically, we'll go into the details of basic PHP scripting for communicating with the API. After reading this tutorial, you can be confident of how to establish basic communication with the Facebook API, retrieve basic user information and then display that information on your website.
The Raw PHP Facebook Developer Documentation Code
For reference, all basic and initial source code samples were obtained from the Facebook developer page. This code, however, is not completely ready to be implemented and requires some changes before it can be considered fully working.
This tutorial will dig into details and attempt to achieve the following simple objectives:
1. Create a PHP application web page hosted on another website (not on Facebook).
2. Allow a Facebook user to log in from your website via that web page.
3. Enable the PHP web application to connect to Facebook using the API application keys.
4. Allow Facebook to confirm the application and retrieve user profile information, which it will provide to the requesting website.
5. Enable the web application to then display the retrieved information on the page.