I’m trying to post a Facebook status update, using the Facebook iOS API, with a message and a link to a photo that is already on Facebook. I have already obtained the URL of the image using the result of an another graph API call. I have already set the App to have permissions for read_stream, publish_stream, offline_access and user_photos.
When I post the image as part of a status update, I receive the error “The operation couldn’t be completed. (facebookErrDomain error 10000.)”. However, if I attempt to post an image not already on Facebook, the status update posts fine and the image is shown.
This is strange as if I attempt to do the same in Facebook on the web by posting to my wall, I can include a link to the image that is in Facebook, which works fine.
Is there something I’m doing wrong attempting to include an image already in Facebook? The call I’m using is:
NSMutableDictionary *params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
@"CIAO",@"message",
@"http://photos-g.ak.fbcdn.net/hphotos-ak-snc6/<rest_of_the_image_url>.jpg", @"picture",
nil];
[_facebook requestWithGraphPath:@"me/feed"
andParams:params
andHttpMethod:@"POST"
andDelegate:self];
what am I doing wrong?
Thanks!
You can no longer post images hosted by Facebook. From the Facebook Developers page on Stream Attachements:
However, the error you should have received is: