如何在iOS中使用SLComposeViewController回复twitter帖子?
我目前正致力于将twitter集成到我的应用程序中,我试图对回复twitter帖子进行一些研究。我知道如何使用SLRequest来完成,但它没有UI。所以,我想使用SLComposeViewController ui进行回复。你们有什么建议吗?谢谢 如果是回复特定推文,请查看以下答案: 因此,除了像下面一样使用SLComposeViewController外,您还需要传递一些额外的参数,包括“in_reply_to_status_id”。上面的链接详细解释了这一点 您可能希望“答复”按钮触发如下内容:如何在iOS中使用SLComposeViewController回复twitter帖子?,ios,twitter,slcomposeviewcontroller,Ios,Twitter,Slcomposeviewcontroller,我目前正致力于将twitter集成到我的应用程序中,我试图对回复twitter帖子进行一些研究。我知道如何使用SLRequest来完成,但它没有UI。所以,我想使用SLComposeViewController ui进行回复。你们有什么建议吗?谢谢 如果是回复特定推文,请查看以下答案: 因此,除了像下面一样使用SLComposeViewController外,您还需要传递一些额外的参数,包括“in_reply_to_status_id”。上面的链接详细解释了这一点 您可能希望“答复”按钮触发如下
-(IBAction)TweetPressed{
if ([SLComposeViewController isAvailableForServiceType:SLServiceTypeTwitter])
{
SLComposeViewController *tweetSheet = [SLComposeViewController composeViewControllerForServiceType:SLServiceTypeTwitter];
[tweetSheet setInitialText:@"@USERNAME_TO_REPLY_TO"];
[self presentViewController:tweetSheet animated:YES completion:nil];
}
else
{
UIAlertView *alertView = [[UIAlertView alloc]
initWithTitle:@"Sorry"
message:@"You can't send a tweet right now, make sure your device has an internet connection and you have at least one Twitter account setup"
delegate:self
cancelButtonTitle:@"OK"
otherButtonTitles:nil];
[alertView show];
}
}
这里有一个完整的教程:我已经尝试过了,但它不起作用,因为它将转到post而不是回复post。对于回复推文,请查看以下答案:我已经尝试过了,但当我尝试获取视图时。子视图为空。我没有看到按钮视图