I want to customize text for the same information but when I am sharing it on Facebook I don’t want to use the twitter hash tags or @username scheme…
How can I diversify text for sharing based on which sharing service would be used?
Ofcourse I’m using UIActivityViewController:
UIActivityViewController *activityVC = [[UIActivityViewController alloc] initWithActivityItems:@[shareText, shareURL] applicationActivities:nil];
Instead of passing the text strings into the
initWithActivityItemscall, pass in your own sub-class of theUIActivityItemProviderclass and when you implement theitemForActivityTypemethod it will provide the sharing service as the ‘activityType’ parameter.You can then return the customized content from this method.