5

I have integrated with UIActivityViewController for sharing images to Facebook:

NSArray* dataToShare = imageArray;  //This is my image array
activityViewController =
        [[UIActivityViewController alloc] initWithActivityItems:dataToShare
                                          applicationActivities:nil];
[[[self parentViewController] parentViewController] presentViewController:activityViewController animated:YES completion:nil];

Sharing is working fine, but there is a problem while sharing multiple images. If there are more than 5 images, it only shares the first 5; the rest are ignored. The same problem occurs while saving the images to the camera roll, but for mail composer, all the images are there.

How can I solve this issue?

Pang
  • 9,564
  • 146
  • 81
  • 122
Guru
  • 4,693
  • 3
  • 25
  • 45
  • I'm just curious when you share multiple images to fb, will those be posted in one single post or separate like one image per post? I'm trying to do it in one single post but so far without success. Here's the [link](http://stackoverflow.com/questions/27586505/share-multiple-images-on-the-same-post-in-facebook-using-uiactivityviewcontrolle) to my problem. Thanks:) – SanitLee Feb 05 '15 at 06:05
  • Same problem here, want to share 40 images :)), but it doesn't show in share. – Twitter khuong291 Dec 19 '15 at 14:47

2 Answers2

3

The behaviour is the same in Photos.app actually.

I'm not sure what the reasoning behind it is but that's how Apple does it as well in their own apps. so I'm guessing it is intended.

Berk
  • 367
  • 2
  • 7
0

Try this:

UIImage *imageToShare = [UIImage imageWithData:[NSData dataWithContentsOfURL:
              [NSURL URLWithString:[NSString stringWithFormat:@"%@", _iconUrl]]]];
Pang
  • 9,564
  • 146
  • 81
  • 122
Manthan
  • 3,856
  • 1
  • 27
  • 58