我在我的应用程序中集成了FHSTwitterEngine,用于从Twitter获取关注者。它之后工作正常5次会产生如下错误
Error Domain=Twitter successfully processed the request, but did not return any content Code=204 "The operation couldn’t be completed. (Twitter successfully processed the request, but did not return any content error 204.)"
NSMutableArray *followersArray = [[NSMutableArray alloc]init]; NSMutableDictionary *dict = [[FHSTwitterEngine sharedEngine]listFollowersForUser:[[FHSTwitterEngine sharedEngine]loggedInUsername] isID:YES withCursor:@"-1"]; if ([dict isKindOfClass:[NSError class]]) { NSLog(@"Getting error and the error is %@",dict); }else{ if ([[dict allKeys]count]>0) { [followersArray addObjectsFromArray:[dict objectForKey:@"users"]]; for (int m=1; m!=0; ) { dict = [[FHSTwitterEngine sharedEngine]listFollowersForUser:[[FHSTwitterEngine sharedEngine]loggedInUsername] isID:YES withCursor:[dict objectForKey:@"next_cursor_str"]]; if ([dict isKindOfClass:[NSError class]]) { NSLog(@"Getting error and the error is %@",dict); break; }else{ m = [[dict objectForKey:@"next_cursor"] intValue]; [followersArray addObjectsFromArray:[dict objectForKey:@"users"]]; } } NSLog(@"The followers list is %@",followersArray); } }
请建议我如何解决此问题。提前谢谢。
答案 0 :(得分:0)
试试这个:
[[FHSTwitterEngine sharedEngine]listFollowersForUser:[[FHSTwitterEngine sharedEngine]loggedInUsername] isID:NO withCursor:@"-1"];