How to attach 5 images to a Facebook feed post using Facebook ios sdk 3.0 How to attach 5 images to a Facebook feed post using Facebook ios sdk 3.0 ios ios

How to attach 5 images to a Facebook feed post using Facebook ios sdk 3.0


You will need to use the Facebook Connect API directly: the iOS SDK does not expose this kind of functionality.

You should have a look at the Publishing section of the Graph Photo API which suggests this URL to upload an image (don't forget to ask for the publish_stream credential):

POST https://graph.facebook.com/USER_ID/photosmessage=[optional description]source=[the image's data]place=[optional image's location]

With the iOS Facebook Connect SDK that would give us this call, given you have a Facebook instance called facebook and a UIImage instance called image:

[facebook requestWithMethodName:@"/USER_ID/photos"                      andParams:[NSDictionary dictionaryWithObjectsAndKeys:                                 UIImageJPEGRepresentation(image, 0.7), @"source",                                 @"My puppy is so cute!!!", @"message",                                 nil]                  andHttpMethod:@"POST"                    andDelegate:self];


ok new idea; how about you send all five of them in a loop, but you keep the status-text and everything else the same. Isn't is possible that facebook then combines them into 1 post?


Facebook did away with multiple pictures in a post a while ago. When you were able to do it, people were creating "banners" that consisted of multiple pictures side by side. Now only 1 pictured is displayed for any wall post.

You can post more pictures, but they won't be sure by default. Facebook will add a "more" link, although they may have done away with that also.

Source: How to publish a wall post with 2 pictures

So you won't be able to feed pots with multiple images. Better way is to combine 5 images in one image.