我正在使用最新的 FHSTwitterEngine 库。我想从所有用户那里获取最近的 20 条推文。
我正在尝试这样做。
self.engine = [[FHSTwitterEngine alloc] init];
[self.engine permanentlySetConsumerKey:TWITTER_CONSUMER_KEY andSecret:TWITTER_SECRET_KEY];
id res = [self.engine searchTweetsWithQuery: @"cricket" count:10 resultType:FHSTwitterEngineResultTypeRecent unil:[NSDate date] sinceID:@"1920030" maxID:@"1930030"];
NSLog(@"%@",res);
当我这样做时,我得到了这个响应。
Error Domain=FHSErrorDomain Code=401 "You are not authorized via OAuth" UserInfo=0xe5cbce0 {url=https://api.twitter.com/1.1/search/tweets.json, parameters={
count = 10;
"include_entities" = false;
"max_id" = 1930030;
q = cricket;
"result_type" = recent;
"since_id" = 1920030;
until = "2014-01-22";
}, NSLocalizedDescription=You are not authorized via OAuth}
我错过了什么吗?