PacktLib: Facebook Application Development with Graph API Cookbook

Facebook Application Development with Graph API Cookbook


About the Authors

About the Reviewer


Creating a New Facebook Application


Downloading PHP-SDK and setting upyour environment

Registering a new Facebook application

Configuring a Facebook application

Getting authorization and a valid session for the user

Requesting specific permissions from the user

Logging out a user

Handling navigation in an iFrame Facebook application

Handling form submission in an iFrame Facebook application

Dynamically resizing an iFrame Facebook application

Determining whether a Facebook page has been liked by a user

Be a part of Social Graph


Retrieving a user's information

Liking a post

Commenting on a given post

Setting status message

Deleting a picture, post, or comment of a user

Retrieving the current user's friendlist

Creating a post on the wall of a user's friend

Posting a picture to a specific album of the user

Retrieving the names of the user's friends who have liked a particular status message

Creating an event

Paging through a user's friends

Searching through a user's feed

Tagging users in a picture

Adding a subscription for real time updates related to a user object

Creating a callback for handling real time updates

Deleting subscriptions

Querying Facebook


Returning information about a user

Getting the status messages of a user

Retrieving profile pictures of a user's friends

Getting the links posted by a user

Getting the Facebook pages followed by a user

Determining if two users are friends

Retrieving information of a group

Retrieving members of a group

Retrieving friends from a specific friend list

Getting all the messages in a thread

Checking the status of permissions for an application

Getting notifications, and their senders, for the current user

Retrieving video details associated with a user

Getting the five latest photos in which a user has been tagged

Retrieving the latest photos published by a user

Retrieving details of an event

Retrieving details of a user's friends by using the multiquery method

Using FB Script


Getting the current user status and performing session validation

Setting up extended permissions during login

Logging out a user

Resetting the size of iframe

Making a Graph API call

Executing an FQL query

Subscribing to an event change

Unsubscribing to an event change

Retrieving a profile picture using XFBML

Adding bookmarks using XFBML

Authentication and setting up extended permissions using XFBML

Expressing Yourself


Prompting the user to publish a story

Using Dialog to add someone as a friend

Using the OAuth Dialog to request permissions for your application

Prompting the user to send a request to friends

Processing requests sent to the user by friends

Bringing Facebook to your Website


Setting up the Like button on your web page

Adding a Like box

Setting up the Activity Feed plugin

Setting up the Facepile plugin on your web page

Integrating the Live Stream plugin using XFBML

Integrating the Comment box using XFBML

Integrating the Send button using XFBML

Login with Faces

Connecting Websites to the Social Graph


Integrating web pages into the social graph

Integrating audio and video data

Administering your page

Publishing stream updates to the users

Fiddling with Virtual Currency


Setting up the application for Facebook Credits

Setting up an application callback for Facebook Credits

Creating Facebook Credits frontend using JavaScript SDK

Getting the order details

Implementing custom offers

Refunding the order

Developing a "Send a Gift" application and integrating with Facebook Credits

Creating Advertisements and Analyzing Metric Data


Retrieving impressions of the Like Box plugin

Retrieving a page's stream views and wall posts using batch request

Getting the number of installations of an application using FQL

Getting statistics about visitors using FQL multiquery

Creating a new ad for your Facebook application

Creating Instant Applications


Creating a "Your Good Luck Charm of the Day" Facebook application

Designing a "My Fast Friends" Facebook application

Setting up a photo collage

Building a birthday calendar

Developing an application to classify friends according to the cities they live in

Using Facebook Open Graph Beta


Setting up your application for using Facebook Open Graph Beta

Defining actions, objects, and aggregations for your application

Customizing the Facebook Auth Dialog box

Requesting permission for publishing to the user's timeline

Defining your web page as a Facebook graph object

Publishing actions of a user to Facebook