Ios4 身份验证后获取Twitter好友列表
我使用了Ios4 身份验证后获取Twitter好友列表,ios4,twitter,mgtwitterengine,Ios4,Twitter,Mgtwitterengine,我使用了mgtwitternegine.m中的以下方法来获取好友列表: (NSString *)getFriendsIds:(NSString *)twitterID { NSString *path = [NSString stringWithFormat:@"friends/ids.%@", API_FORMAT]; NSMutableDictionary *params = [NSMutableDictionary dictionaryWithCapacity:0];
mgtwitternegine.m
中的以下方法来获取好友列表:
(NSString *)getFriendsIds:(NSString *)twitterID
{
NSString *path = [NSString stringWithFormat:@"friends/ids.%@", API_FORMAT];
NSMutableDictionary *params = [NSMutableDictionary dictionaryWithCapacity:0];
[params setObject:twitterID forKey:@"user_id"];
return [self _sendRequestWithMethod:nil path:path queryParameters:params body:nil
requestType:MGTwitterUserInformationRequest
responseType:MGTwitterUsers];
}
在我的课堂上,我打了以下电话:
NSLog(@"friends %@",[_engine getFriendsIds:@"user_id"]);
我无法检索朋友列表
- (void)userInfoReceived:(NSArray *)userInfo forRequest:(NSString *)connectionIdentifier {
//NSLog(@"User Info Received: %@", userInfo);
followTweet = [[TweetFollow alloc]initWithStyle:UITableViewStylePlain];//Table
TweetModel *tweetFollw = [[TweetModel alloc]initWithTweetFollwerArray:userInfo];//Model
[followTweet.tweetFollow addObject:tweetFollw];
NSLog(@"ARRYYYYYY: %@",followTweet.tweetFollow );
followTweet.view.frame = CGRectMake(161, 0, 160, 420);
[self.view addSubview:followTweet.view];
[tweetFollw release];
}
#define TWITTER_DOMAIN @"api.twitter.com/1" // Plz change this in to MGTwitterEngin.m
-(void)viewWillApper {
//_engine is instance of MGTwitterEngin class
[_engine getFollowersIncludingCurrentStatus:NO];
}
这是一个简单的代码,通过它你可以获得twitter好友列表;
谢谢 对不起,你得用英语再问一遍。Posez la questionánouveau en anglais.也许我可以为他翻译,照我们说的做。翻译后,OP将不得不接受更改,因为我没有获得完全的编辑权@用户1195279 J'ai traduit ta question en anglais,这是一个接受变化的人,他是一个很好的支持者,同时也是一个很好的支持者