Possible Duplicate:
Get twitter Follower in IOS 5


如何使用iOS5将Twitter帐户关注者访问iphone?
我是iOS5新手,请提供一些代码或链接可以提出建议。

提前致谢
巴斯卡

最佳答案

在IOS5中,twitter设置为...。然后不使用多余的框架...
试试这个代码

- (void)OnTwitter {
        Class TWTweetComposeViewControllerClass = NSClassFromString(@"TWTweetComposeViewController");

            if (TWTweetComposeViewControllerClass != nil) {
                if([TWTweetComposeViewControllerClass respondsToSelector:@selector(canSendTweet)]) {
                    UIViewController *twitterViewController = [[TWTweetComposeViewControllerClass alloc] init];

                    [twitterViewController performSelector:@selector(setInitialText:)
                                                withObject:twitterText];
                    [twitterViewController performSelector:@selector(addURL:)
                                                withObject:[NSURL URLWithString:url]];

                    [twitterViewController performSelector:@selector(addImage:)
                                                withObject:urImage];
                    [self presentModalViewController:twitterViewController animated:YES];
                    [twitterViewController release];
                }
        else {
        // Use ShareKit for previous versions of iOS
        }

    }

在您的 class 中导入farmeWork
#import <Twitter/Twitter.h>
 #import <Accounts/Accounts.h>

关于iphone - 如何使用iOS5将Twitter帐户关注者访问iphone? ,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/8500985/

10-09 06:31