objective c - setInitialText method in SLComposeViewController iOS 8.3 does not show text in Facebook sheet -
the code snippet below callback on screen button. facebook sheet appears contains no text. however, if replace slservicetypefacebook
slservicetypetwitter
show initial text. using xcode 6.3.1 , ios 8.3 on iphone 6. thank in advance.
-(ibaction)facebookbutton:(id)sender { if ([slcomposeviewcontroller isavailableforservicetype:slservicetypefacebook]) { nsstring* facebooktext = @"awesome app"; slcomposeviewcontroller *fbpostsheet = [slcomposeviewcontroller composeviewcontrollerforservicetype:slservicetypefacebook]; [fbpostsheet setinitialtext:facebooktext]; [self presentviewcontroller:fbpostsheet animated:yes completion:nil]; } else{ uialertview *alertview = [[uialertview alloc] initwithtitle:@"unable connect facebook" message:@"make sure device has internet connection , have facebook account setup in settings app" delegate:self cancelbuttontitle:@"ok" otherbuttontitles:nil]; [alertview show]; } }
if delete facebook app on device, initial text appear.
Comments
Post a Comment