O'Reilly logo

Facebook Cookbook by Jay Goldman

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Checking Extended Permissions

Problem

How can I check to see whether a user has granted my app extended permissions?

Solution

Use the Users.hasAppPermission() method, which is not currently included in the PHP Client Library (see Adding Missing PHP Client Library Methods):

$permission = $facebook->api_client->Users_hasAppPermission('status_update');

Discussion

This will return true (1) or false (0). There are three extended permissions you can check for:

status_update

You can set the user’s status with Users.setStatus().

create_listing

You can create Marketplace listings for the user.

photo_upload

You can upload photos and set tags on nonpending photos.

See Extended Permissions for more information.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required