Question

I have successfully uploaded photos to a Facebook Page that I am not the administrator of using the iOS FacebookSDK. However those photos are invisible to everyone except the uploader.

The page has the "Everyone can post to Page's timeline" and "Everyone can add photos and videos to Page's timeline" settings on.

I am using the following code, where self.photo is a UIImage:

FBRequest *request = [FBRequest requestForUploadPhoto:self.photo];
request.graphPath = @"<pageid>/photos";
request.session = [FBSession activeSession];
FBRequestConnection *conn = [FBRequestConnection new];
[conn addRequest:request completionHandler:^(FBRequestConnection *connection, id result, NSError *error) { ... }];
[conn start];

The upload / post is successful. If you view the page in question, as the user who uploaded the photo, you can see the photo on the page in the "Recent Posts by Others" box.

However, if you view that page as another user - no activity appears on the page and the "Recent Posts by Others" box is empty.

If that other user then uses the app to upload a photo in the same way, the same thing happens to them: they can see the photo they've uploaded but the first user cannot.

All photos uploaded by either user show to that user as "Shared with: Public" and "via" the application used. So it doesn't appear that they are hidden because of privacy or something like that.

I have seen many others post that they have been unable to upload photos to a page as a user (not the administrator of the page), e.g.:

I have been able to upload the photo, but it only shows to the uploader! Is this some functionality that has changed? Am I running into a bug? It's very strange, I would love it if someone could shed some light!

Was it helpful?

Solution 2

Success! It works, I have posted as a user to a Facebook page.

Where self.photo is an NSData:

NSDictionary *parameters = @{@"test.jpg": self.photo, @"message": self.message};
FBRequest *request = [FBRequest requestWithGraphPath:@"<pageid>/photos" parameters:parameters HTTPMethod:@"POST"];

Then the rest as per my question above.

OTHER TIPS

Unfortunately it appears that while the Facebook API allows you to get further, it does still not work to upload photos to the timeline of a page.

This bug appears to be related and has been open for a while: https://developers.facebook.com/bugs/246002638848837/

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