0

I want to use UIActivityViewController to share something to Facebook, and I want to customize my "image card space", So I can click the blue area and direct to other website

the image is from Facebook, and it say the blue area is image card space enter image description here

this is a screen shot from other app, this app use UIActivityViewController too, so I believe it can be done, I try to search the information about how to implement, but it fail, maybe I use the wrong key word

enter image description here enter image description here

this is my code

UIImage *Img = [UIImage imageNamed:@"myImg.png"];  
NSString *myString = @"hi, I am strign";
NSURL *myUrl = [NSURL URLWithString:@"www.google.com"];
NSArray *items = @[myString, Img, myUrl];

UIActivityViewController *avc = [[UIUIActivityViewController alloc] initWithActivityItems:items applicationActivities:nil];

self presentViewController:avc animated:YES completion:nil];

and this is what I get

enter image description here

just Image appear

myString does not appear, I guess this is because,it will appear in"user message field", and this is illegal(the first image), so iOS delete it

but where is my URL? if I post this to Facebook, it just a Image, I can't direct to other website

Is anyone know how to customize image card space?

=====================edit==================

ok, i think i got it

the app not customize the area

it just put the url

and iOS get the data automatly, and display it

so, just put url to UIActivityViewController

if anything wrong please re correct me

jim
  • 1,035
  • 1
  • 8
  • 16
  • Did you already check this? http://stackoverflow.com/questions/29890747/ios-how-to-share-text-and-image-on-social-networks – PowHu Nov 05 '15 at 04:37
  • 1
    If you want to redirect to specific site, then don't include image share only your text and URL, it will automatic make redirect post. – VRAwesome Nov 05 '15 at 04:41
  • i think this question is why string disappear,not how to customize – jim Nov 05 '15 at 04:41

0 Answers0