vorrebbe vista iphone con avanzamento di tutti i tweet Twitter con un determinato hashtag

StackOverflow https://stackoverflow.com/questions/3685174

  •  02-10-2019
  •  | 
  •  

Domanda

Qual è il modo più semplice per visualizzare questo tipo di alimentazione? Ho sentito che si può fare questo con Yahoo Pipes, ma non Twitter supporta direttamente questo?

Grazie!

È stato utile?

Soluzione

http://search.twitter.com/search?q=%23weloveyouss501

c'è il tag hash ... vedi in alto a destra v'è un feed RSS di questa query:

http://search.twitter.com/search.atom?q= % 23weloveyouss501

brillante - ora tutto ciò che serve è TouchXML e questa funzione:

-(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
    }

}

Se l'uscita blogEntries vedrete tutte le voci. :) Ora si può arrivare a loro con facilità. :)

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top