Question

I'm using the Facebook PHP SDK and I want users to be able to access their Facebook photos from inside my site. I'm using the code below to get the Facebook login URL to give my app permission to access their photos.

The problem is when the Facebook permissions window pops up, it tells them my app will be accessing their public profile, friend list and photos. Some users may be skeptical of this, since I only need to access their photos.

Is there a way to only give an app access to photos and nothing else? Or at least not include their friend list?

$fb_login_url = $facebook->getLoginUrl(
    array(
        'scope' => 'user_photos'
    )
);

EDIT: Not possible. From Facebook's website (link in accepted answer):

In addition to the email address and birthday that you requested, a request on the web automatically asks for access to a person's public profile and list of friends. The full list of permissions, including defaults, is included in this document.`

Was it helpful?

Solution

As far as I know that is the basic_info scope and is included in all requests. Maybe just inform your users before hand that you will only be using the access to their photos?

Have a look on the Facebook developer page here:

https://developers.facebook.com/docs/facebook-login/permissions/#revoking

You could try to revoke the basic_info scope and see if it works. You can only revoke permission after the user has given permission so I think a notice would work better.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top