![](/img/trans.png)
[英]Obj-C: How to get and call a block argument from NSInvocation - stubbing Twitter account on iOS
[英]Twitter API : How to get a list of users that a Twitter's user follow (MGTwitterEngine for Obj-C)
我想知道是否可以通過MGTwitterEngine for Obj-C獲得Twitter用戶關注的朋友列表(以下列表)?
如果有可能,請指導我該怎么做,謝謝
你被允許 MGTwitterEngine在AppController.m中提供了其方法的示例代碼。 這是用於檢索任何人關注的列表的方法。
[twitterEngine getFriendIDsFor:@"username_here" startingFromCursor:-1]
將其與關注者方法一起添加到MGTwitterEngine.h
- (NSString *)getFollowingIncludingCurrentStatus:(BOOL)flag;
並將其與MGTwitterEngine.m以及關注者方法一起使用
- (NSString *)getFollowingIncludingCurrentStatus:(BOOL)flag
{
NSString *path = [NSString stringWithFormat:@"statuses/friends.%@", API_FORMAT];
NSMutableDictionary *params = [NSMutableDictionary dictionaryWithCapacity:0];
if (!flag) {
[params setObject:@"true" forKey:@"lite"]; // slightly bizarre, but correct.
}
return [self _sendRequestWithMethod:nil path:path queryParameters:params body:nil
requestType:MGTwitterFollowedTimelineRequest
responseType:MGTwitterUsers];
}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.