1

I am using UIActivityViewController for sharing Image,Url and TextMessage. While sharing data on facebook it is not sharing my TextMessage.

my code:

NSString *text = @"Hey we should check this out!";
NSURL *url = [NSURL URLWithString:@"https://www.google.co.in/?gfe_rd=cr&ei=AxtqWLjmIIHy8AfF3JfoAg"];

UIActivityViewController *controller =  [[UIActivityViewController alloc]
     initWithActivityItems:@[text, url, _img_mainImage.image]
     applicationActivities:nil];
[self presentViewController:controller animated:YES completion:nil];
Mayank Patel
  • 3,868
  • 10
  • 36
  • 59
Niharika
  • 1,188
  • 15
  • 37
  • refer this link http://stackoverflow.com/questions/29890747/ios-how-to-share-text-and-image-on-social-networks – Jigar Jan 02 '17 at 09:55

1 Answers1

0

It seems that a recent update to the Facebook application has replaced the in-built Facebook share activity with one that ignores status text - If you remove the Facebook app from your device the text will be displayed using the code you have. If you have the Facebook app installed you get images, URLs but not the text

Facebook's policies don't allow you to pre-populate status messages and require all content to be user generated - while I understand the intention behind this, I personally think it is kind of stupid in many cases - For example in my game I want to pre-populate the user's score, but now I can't, so the user is presented with an empty dialog box. I will probably simply remove the Facebook sharing option as no-one will ever use it now.

Himanshu Patel
  • 1,015
  • 8
  • 26