Facebook SDK v5 for PHP
Whether you're developing a website with Facebook login, creating a Facebook Canvas app or Page tab, the Facebook SDK for PHP does all the heavy lifting for you making it as easy as possible to deeply integrate into the Facebook platform.
For installation & implementation instructions, look through the Getting Started with the Facebook SDK for PHP guide, and then check out some of the examples below.
The following examples demonstrate how you would accomplish common tasks with the Facebook SDK for PHP.
- Authentication & Signed Requests
- Facebook Login (OAuth 2.0)
- Obtaining an access token within a Facebook Canvas context
- Obtaining an access token within a Facebook Page tab context
- User profile
- Retrieve a user's profile
- Post a link to a user's feed
- File Uploads
- Upload a photo to a user's profile
- Upload a video to a user's profile
- Batch Requests
- Sending requests in a batch
- Uploading files in a batch
- Basic pagination
For a full list of classes, see the API reference page.
PHP SDK on Github
The Facebook SDK for PHP is an open source project hosted on Github. You can get the latest version of the SDK or contribute to it via Github:PHP SDK on Github