0

I'm using TWRequest to query twitter. I would like to know how to add +exclude:retweets filters at the end of the URL. This is my code:

NSString *searchURL = [NSString stringWithFormat:@"http://search.twitter.com/search.json"];
        NSMutableDictionary *dict_req;

dict_req = [NSMutableDictionary dictionaryWithObjectsAndKeys:@"50", @"rpp", @"true", @"include_entities", searchParams, @"q", nil];

TWRequest *request = [[TWRequest alloc] initWithURL:[NSURL URLWithString:searchURL]
                                                      parameters:dict_req requestMethod:TWRequestMethodGET];

[request performRequestWithHandler:^(NSData *responseData, NSHTTPURLResponse *urlResponse, NSError *error)
     {
      //results
    }];
Valerio
  • 513
  • 2
  • 14

1 Answers1

0

First working solution: use nil as the dictionary of the parameters and manually add the parameters to the searchURL. Unfortunately it seems not to be working for complex queries...

NSString *searchURL = [NSString stringWithFormat:@"http://search.twitter.com/search.json?q=ciao+exclude:retweets"];

TWRequest *request = [[TWRequest alloc] initWithURL:[NSURL URLWithString:searchURL] parameters:nil requestMethod:TWRequestMethodGET];

Valerio
  • 513
  • 2
  • 14