Home arrow PHP arrow 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.

TABLE OF CONTENTS:
  1. Facebook PHP API Applications: A Second Look
  2. Understanding the Facebook Graph API
  3. Is the user logged in?
  4. Final Facebook PHP API Script - Display basic user information
By: Codex-M
Rating: starstarstarstarstar / 5
August 16, 2010

print this article
SEARCH DEV SHED

TOOLS YOU CAN USE

advertisement

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.

The flow chart will look like this:



 
 
>>> More PHP Articles          >>> More By Codex-M
 

blog comments powered by Disqus
   

PHP ARTICLES

- PHP Closures as View Helpers: Lazy-Loading F...
- Using PHP Closures as View Helpers
- PHP File and Operating System Program Execut...
- PHP: Effects of Wrapping Code in Class Const...
- PHP: Building Concrete Validators
- Sanitizing Input with PHP
- Executing Shell Commands with PHP
- Handling File Data with PHP
- File Security and Resources with PHP
- ArrayObject PHP Class Examples
- ArrayObject PHP Class: An Introduction
- Getting File System Data with PHP
- PHP Tools for Working with the File and Oper...
- Working with the File and Operating System w...
- PHP Proxy Patterns: Completing a Blog


© 2003-2012 by Developer Shed. All rights reserved. DS Cluster 9 - Follow our Sitemap

Dev Shed Tutorial Topics: