iOS 13中的Twitter共享

iOS 13中的Twitter共享,ios,objective-c,twitter,share,Ios,Objective C,Twitter,Share,我正在iOS 13中搜索twitter共享图像和视频。我试过这个,但iOS 11中不推荐使用“SLServiceTypeTwitter” SLComposeViewController *tweetSheet = [SLComposeViewController composeViewControllerForServiceType:SLServiceTypeTwitter]; [tweetSheet addImage:[UIImage imageNamed:@"twitter.png

我正在iOS 13中搜索twitter共享图像和视频。我试过这个,但iOS 11中不推荐使用“SLServiceTypeTwitter”

SLComposeViewController *tweetSheet = [SLComposeViewController composeViewControllerForServiceType:SLServiceTypeTwitter];
[tweetSheet addImage:[UIImage imageNamed:@"twitter.png"]];
[tweetSheet setCompletionHandler:^(SLComposeViewControllerResult result) {

}];

[self presentViewController:tweetSheet animated:YES completion:Nil];
我发现的另一种方法是使用API进行共享。 需要用户授权

请告诉我哪种方式是分享图像和视频的最佳方式


或者,如果该应用程序安装在设备中,是否有任何方法可以打开带有图像和视频共享的twitter应用程序。

我写了一篇教程,介绍了如何做到这一点。查看:@GeneCode我有点困惑,设置中的SLServiceTypeTwitter和帐户在iOS 11中被弃用,如果我的目标是iOS 13的min版本,它将可用?是的。不推荐意味着他们计划稍后删除它,但尚未删除。因此,您实际上可以在特定的IOS版本中使用不推荐使用的函数。绝对没有在IOS13中使用的问题这是否回答了您的问题?我写了一个教程如何做到这一点。查看:@GeneCode我有点困惑,设置中的SLServiceTypeTwitter和帐户在iOS 11中被弃用,如果我的目标是iOS 13的min版本,它将可用?是的。不推荐意味着他们计划稍后删除它,但尚未删除。因此,您实际上可以在特定的IOS版本中使用不推荐使用的函数。绝对没有在IOS13中使用的问题这是否回答了您的问题?