Facebook文本共享中的问题,如果分享推特或任何社交媒体的工作。在哪里,我犯了一个错误,请告诉我:
NSString *textToShare = [NSString stringWithFormat:@" Hi stackoverflow;
NSArray *objectsToShare = @[textToShare];
UIActivityViewController *activityVC = [[UIActivityViewController alloc] initWithActivityItems:objectsToShare applicationActivities:nil];
NSArray *excludeActivities = @[UIActivityTypeAirDrop,
UIActivityTypePrint,
UIActivityTypeAssignToContact,
UIActivityTypeSaveToCameraRoll,
UIActivityTypeAddToReadingList,
UIActivityTypePostToFlickr,
UIActivityTypePostToVimeo];
activityVC.excludedActivityTypes = excludeActivities;
[self presentViewController:activityVC animated:YES completion:nil];