Implementing search function in IOS using api1.1


I followed the example given here:

This example only shows how to get the timeline of the user. Instead I wanna use the search api such that given the longitude and lantitude pair plus a range, it could return tweets within that area.

However, I’m not quite clear about the param variable used in that example. I tried the search api with the param variable, an error occurs. I guess there must be something wrong with param. Could anyone please give me a hint on it?

NSDictionary *params = @{@“screen_name” : @“user_name”,
@“include_rts” : @“0”,
@“trim_user” : @“1”,
@“count” : @“5”};


Yes, your params will not work for that endpoint. According to [node:10287], you need at least the parameter q to make a query to the search endpoint. So, to perform a search for my screen name, @theSeanCook, you could use the following URL and params:

NSURL *url = [NSURL URLWithString:@""]; NSDictionary *params = @{@"q" : @"theSeanCook", @"count" : @"1"};