Wednesday, 14 August 2013

iOS Twitter reply dialog

iOS Twitter reply dialog

I want to add the ability to reply to tweets and would like to use the
built-in dialog. Is there any way to do this, or maybe a library that
exists for this scenario?
I've tried simply adding @username as the initial text in the dialog, but
it doesn't post it as a reply to a particular tweet:
SLComposeViewController* cvc = [SLComposeViewController
composeViewControllerForServiceType:SLServiceTypeTwitter];
cvc.completionHandler = ^(SLComposeViewControllerResult result) { };
[cvc setInitialText:[NSString stringWithFormat:@"@%@", [self.tweet
objectForKey:@"twitter_screen_name"]]];
[controller presentViewController:cvc animated:YES completion:nil];
Is there a solution, or do I need to just manually create a dialog and
style it?

No comments:

Post a Comment