iOS 8.3及更高版本,Facebook共享文本未插入

在更新到iOS 8.3之后,文本不会被插入到共享对话框中

我使用一个标准

UIActivityViewController *vc = [[UIActivityViewController alloc] initWithActivityItems:items applicationActivities:applicationActivities]; NSArray *excludeActivities = @[UIActivityTypeAssignToContact]; vc.excludedActivityTypes = excludeActivities; if (IsUserInterfaceIdiomPad) { vc.popoverPresentationController.sourceView = self.navigationController.view; } [self.navigationController presentViewController:vc animated:YES completion:^{ }]; 

项目是NSString和NSURL

看起来像Facebook不希望应用程序预先传播与文本的共享对话框:(

它不需要对iOS版本做任何事情,而是在Facebook应用程序中构build(因为共享stream程与FB应用程序有某种程度上的联系)

这是愚蠢的,在Android上,你也不能这样做(它已经被禁用了很久以前),我希望Facebook重新考虑这一点,因为这将导致更less的股份,有些人可能愿意放弃股票期权

注意:如果用户没有安装FB应用程序(他删除它),比文本添加到状态,但我想只有less量的用户,但也许是一个很好的理由仍然提供文本到分享项目

  NSString *strName= @"Mohit Thatai"; FBSDKLoginManager *login = [[FBSDKLoginManager alloc] init]; [login logInWithReadPermissions: @[@"public_profile", @"email"] handler:^(FBSDKLoginManagerLoginResult *result, NSError *error) { if (error) { NSLog(@"Process error"); } else if (result.isCancelled) { NSLog(@"Cancelled"); } else { FBSDKShareLinkContent *content = [[FBSDKShareLinkContent alloc] init]; [content setContentTitle:@"GPS Tracker"]; [content setContentDescription:[NSString stringWithFormat:@"%@ shared an interesting link\n This might be interesting to you: GPS Tracker for Kids",strName]]; content.contentURL = [NSURL URLWithString:[NSString stringWithFormat:@"http://gpsphonetrackerkids.com"]]; [FBSDKShareDialog showFromViewController:self withContent:content delegate:nil]; } }];