If you read the documentation-
picture: The URL of a picture attached to this post. The picture must be at least 200px by 200px.
So, you cannot pass the image data to the feed- only a link to that picture will work.
To solve this, you just have 2 options-
Save the image to a server, and generate the link and pass this link to the
picture
parameter.Upload the image in facebook using- this wont work check "Edit-2"\POST /photos
, then use its link in thepicture
parameter.
Edit 1: To get the picture link-
[FBRequestConnection startWithGraphPath:@"/{photo-id}?fields=picture"
parameters:nil
HTTPMethod:@"GET"
completionHandler:^(
FBRequestConnection *connection,
id result,
NSError *error
) {
/* handle the result */
}];
(This can be ignored since facebook cdn images cant be used in the picture
parameter. Check "Edit-2")
Edit 2:
According to the facebook guys-
object_attachment
is not supported for feed dialogs.picture
is the correct method to modify the image for your post. However, you can not specify an image from Facebook's CDN for this parameter.
So I guess you are just left with one option- to upload phorto on other server than facebook and use that url in the picture
parameter.