1
votes

I'm using the Facebook Graph API to post a photo to a user's album.

The posting of the photo works and is created in the requested album but I have been unable to make the photo public.

The album is set to public and other photos in the album are available to logged out users. When the user gives permission to the app they also select that anything posted by the app is made public. Any ideas why this is happening?

Here is the code:

$ret_obj = $this->facebook->api('123123123/photos', 'POST', array(
    'source' => '@' . $photo,
    'message' => $message,
));

These are the permissions I'm asking for:

$url = $this->facebook->getLoginUrl( array(
    'scope' => 'photo_upload, user_photos, publish_stream'
));
1

1 Answers

2
votes

As per the Reference docs (which did not contain this information, but I've since added) you need to supply an additional privacy parameter in your API call, which I believe looks like this (my PHP is not strong):

$privacy = array(
  'value'=> 'EVERYONE',
)

$ret_obj = $this->facebook->api('123123123/photos', 'POST', array(
                                 'source' => '@' . $photo,
                                 'message' => $message,
                                 'privacy' => $privacy
                                 )
                              );