0

这里我有一段代码

(void)postToTwitter:(id)sender 
{

    if ([SLComposeViewController isAvailableForServiceType:SLServiceTypeTwitter])
    {
        SLComposeViewController *tweetSheet = [SLComposeViewController composeViewControllerForServiceType:SLServiceTypeTwitter];
        [tweetSheet setInitialText:@"Great fun to learn iOS programming at softwareWeaver!"];
        [self presentViewController:tweetSheet animated:YES completion:nil];
    }

}

但是接下来要做什么????

4

1 回答 1

2

您可以使用STTwitter 库,它使这一切变得非常简单:

self.twitter = [STTwitterAPI twitterAPIOSWithFirstAccount];

[_twitter verifyCredentialsWithSuccessBlock:^(NSString *username) {

    [_twitter getFollowersForScreenName:username successBlock:^(NSArray *followers) {
        NSLog(@"-- %@", followers);
    } errorBlock:^(NSError *error) {
        //
    }];

} errorBlock:^(NSError *error) {
    //
}];
于 2014-02-09T16:43:43.810 回答