I'm working with Twitter's API, and the parameters I try to send along an SLRequest seem to be ignored:
SLRequest *request = [SLRequest requestForServiceType:SLServiceTypeTwitter requestMethod:SLRequestMethodGET URL:[NSURL URLWithString:@"https://api.twitter.com/1.1/statuses/home_timeline.json"] parameters:@{@"count":@50}];
[request setAccount:self.twitterAccount];
[request performRequestWithHandler:^(NSData *responseData, NSHTTPURLResponse *urlResponse, NSError *error) {...}];
Here, although I give it a count=50
argument, I receive only 20 tweets. When I look at the connection using Charles Proxy, I don't see this argument sent anywhere in the request. Why doesn't SLRequest take my parameters into account?
It turns out the only type of parameters SLRequest accepts is NSString. So I should have sent
@{@"count":@"50"}
instead of@{@"count":@50}
.