Getting the status messages of a user

We can query using FQL to retrieve the status messages of a user, as well as his/her friends.

Getting ready

You should have already set up config.php and index.php as explained in the beginning of the chapter. Also, to be able to access the status message of a user, the application needs to have the user_status permission. If we even want to access the status messages of friends, then we need the friends_status permission as well.

How to do it...

The following steps will demonstrate how to get the status messages of a user:

  1. Open index.php and append the following code to it:
        Status messages of <?php echo $me['name']; ?> are listed below - <br>
  2. Retrieve the status messages of the user by executing ...

Get Facebook Application Development with Graph API Cookbook now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.