Skip to content

Instantly share code, notes, and snippets.

@gonzalezreal
Created October 24, 2012 07:26
Show Gist options
  • Save gonzalezreal/3944542 to your computer and use it in GitHub Desktop.
Save gonzalezreal/3944542 to your computer and use it in GitHub Desktop.
- (SLRequest *)requestForNewTweets
{
NSMutableDictionary *parameters = [NSMutableDictionary dictionary];
parameters[@"include_rts"] = @"true";
TGRTweet *lastTweet = [TGRTweet lastTweetInManagedObjectContext:self.managedObjectContext];
if (lastTweet) {
parameters[@"since_id"] = [lastTweet.identifier stringValue];
}
SLRequest *request = [SLRequest requestForServiceType:SLServiceTypeTwitter
requestMethod:SLRequestMethodGET
URL:[NSURL URLWithString:kHomeTimelineURL]
parameters:parameters];
request.account = self.account;
return request;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment