我正在使用 Matt Gemmell 的 MGTwitterEngine 版本,并且试图从 getSearchResultsForQuery 方法中获取一些结果。
// do a search
[_engine getSearchResultsForQuery:@"#quote"];
// delegate method for handling result
- (void)searchResultsReceived:(NSArray *)searchResults forRequest:(NSString *)connectionIdentifier
{
if ([searchResults count] > 0)
{
NSDictionary *singleResult = [searchResults objectAtIndex:1];
NSString *text = [singleResult valueForKey:@"text"];
NSLog(@"Text at Index one: \n %@", text);
}
}
但是,我似乎从来没有得到结果。在控制台中,我得到:
Request 7E4C3097-88D6-45F1-90D2-AD8205FBAAC5 failed with error: Error Domain=HTTP Code=400 "Operation could not be completed. (HTTP error 400.)"
有没有解决的办法?我是否实现了委托方法?(另外,我在为引擎安装 YAJL 的东西时遇到了困难,想知道这是否与它有关)