显示此类Feed的最简单方法是什么?我听说你可以这样做 雅虎管道,但Twitter直接支持这个吗?
谢谢!
答案 0 :(得分:0)
http://search.twitter.com/search?q=%23weloveyouss501
有你的哈希标签...在右边看到这个查询的RSS提要:
http://search.twitter.com/search.atom?q=%23weloveyouss501
辉煌 - 现在你需要的只是TouchXML和这个功能:
-(void)getRSSFeed:(NSString *)XMLString {
blogEntries = [[[NSMutableArray alloc] init] autorelease]; // blogEntries in header
NSError *theError;
CXMLDocument *rssParser = [[[CXMLDocument alloc] initWithXMLString:XMLString options:0 error:&theError] autorelease];
if(theError){
NSLog(@"An error");
}
NSArray *resultNodes = NULL;
resultNodes = [rssParser nodesForXPath:@"//item" error:nil];
for (CXMLElement *resultElement in resultNodes) {
NSMutableDictionary *blogItem = [[NSMutableDictionary alloc] init];
int counter;
for(counter = 0; counter < [resultElement childCount]; counter++) {
[blogItem setObject:[[resultElement childAtIndex:counter] stringValue] forKey:[[resultElement childAtIndex:counter] name]];
}
[blogEntries addObject:[blogItem copy]]; // blog entries set in header
}
}
如果输出blogEntries
,您将看到所有条目。 :)现在你可以很容易地找到它们。 :)