iphone - 如何使用 iOS5 将 Twitter 帐户关注者访问到 iPhone?

标签 iphone ios xcode ipad twitter

Possible Duplicate:
Get twitter Follower in IOS 5

如何使用 iOS5 在 iPhone 中访问 Twitter 帐户关注者? 我是 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/

相关文章:

ios - 在应用程序运行时启用/禁用核心数据的 iCloud 同步

ios - 为 Swift 2 更新 Alalmofire 和 SwiftyJSON

iphone - 使用私有(private)框架 : Importing RadioPreferences. h

iphone - iPhone 模拟器 4.0 中 Home 按钮无法退出应用程序

ios - UITableview:如何禁用某些行而不是其他行的选择

Xcode "directory not found for option -L"错误

ios - Xcode - 如何将程序员的名字更改为公司?

iphone - 将 "To:"字段设置为 MFMailComposeViewController 中的第一响应者

ios - 按下 SFSafariViewController 时出现黑色标签栏

ios - 从未调用过的 UICollectionViewDelegateFlowLayout 方法