Question

Not able to share url in Twitter and Facebook, here is my code :

- (IBAction)btnSharePressed:(UIButton *)sender
{

    UIImage *shareImage = [UIImage imageNamed:@"toolBar.png"];
    NSString *shareTitle = @"Share Title";
    NSURL *shareUrl = [NSURL URLWithString:@"http://www.google.com"];

    NSArray *Items = @[shareUrl,shareImage,shareTitle];

    UIActivityViewController *activityVC = [[UIActivityViewController alloc]
                                              initWithActivityItems:Items
                                              applicationActivities:nil];

    [activityVC setValue:shareTitle forKey:@"subject"];

    [self presentViewController:activityVC animated:YES completion:nil];
}

Only getting shareTitle content in the Twitter and Facebook post compose box, content of shareUrl is missing, image is rendering perfectly. Please let me know where am i mistaking? thanks in advance.

UPDATE

I got to know that image of url is overlapping with the image which i want to attach, can any one help me how to show url with text link instead of url converted in image ?

Was it helpful?

Solution

There is no problem with Code and its share all detail provided ,

I guess your problem is that you are not showing all in share popup, because image and url are showed owerlapped,

enter image description here

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top