Conversations with search api


#1

Hi
i’m using STTwitter to retrieve tweets in my iOS app.
Actually i’m trying to recreate conversations using the search API with
from: , to: and OR operator.

However my list is always empty, but if i try the same query on twitter console(or on the twitter website ) i got a lot of results.

Where i’m wrong?

      NSString *query =
      [NSString stringWithFormat:@"(from:%@ OR to:%@)", screenName, screenName];

[[TwitterTeamService shared].twitter getSearchTweetsWithQuery:query
          geocode:nil
          lang:nil
          locale:nil
          resultType:nil
          count:@"100"
          until:nil
          sinceID:nil
          maxID:nil
          includeEntities:[NSNumber numberWithBool:YES]
          callback:nil
          successBlock:^(NSDictionary *searchMetadata, NSArray *statuses) {
    
            if ([statuses count] > 0) {
             NSLog(@"got tweets")
            } else {
              NSLog(@"No tweets found for %@", screenName);
            }
    
          }
          errorBlock:^(NSError *error) {
            NSLog(@"%@", [error description]);
          }];

#2

How old are the Tweets that you are trying to retrieve? (The search API will only provide you with very recent Tweets)


#3

hi
tweets that i’m retrieving are several days old.

However there is something strange with STTwitter (i was using 0.1.8) when i reverted to 0.1.5 it started to return me some tweet.


#4

Thank you @Garixi for reporting that.

It was a regression in STTwitter.

I just fixed it the trunk version.

It will be part or release 0.2.0.