ios - UIActivityViewController Facebook share text -


i'm trying post facebook/twitter prefilled text using uiactivityviewcontroller. not able populate pre-filled text, below sample code.

uiimage* shareimage =  [self saveversiongraphicsandthumbnailimage:self.drawingview]; nsstring* message = @"my post - "; nsarray* shareitems = @[message, shareimage];  uiactivityviewcontroller * avc = [[uiactivityviewcontroller alloc] initwithactivityitems:shareitems applicationactivities:nil];  if (system_version_greater_than_or_equal_to(@"8.0")) {     uipopoverpresentationcontroller *presentationcontroller = [avc popoverpresentationcontroller];     presentationcontroller.sourceview = sender; } [self presentviewcontroller:avc animated:yes completion:nil]; 

please to solve issue, in advance.

it seem facebook no longer wants developers pre-fill posts text. https://developers.facebook.com/docs/sharing/ios#ios-integration:

use of ios share sheet subject facebook platform policy, including section 2.3 states apps may not pre-fill. in context of share sheet, means apps may not pre-fill share sheet's initialtext field content wasn't entered people earlier in use of app. seems prefer devs use sdk:

while can use ios native view controller api (share sheet) directly, there several reasons use native ios share dialog provided facebook sdk. using native share dialog provides quick way test people have signed facebook on ios 6+ devices. api uses same style block other parts of facebook sdk.


Comments

Popular posts from this blog

javascript - Google App Script ContentService downloadAsFile not working -

javascript - Function overwritting -

php - Find a regex to take part of Email -