Skip to content

Instantly share code, notes, and snippets.

@gonzalezreal
Created October 24, 2012 07:31
Show Gist options
  • Select an option

  • Save gonzalezreal/3944561 to your computer and use it in GitHub Desktop.

Select an option

Save gonzalezreal/3944561 to your computer and use it in GitHub Desktop.
- (void)importTweets:(NSArray *)tweets
{
for (NSDictionary *tweetDictionary in tweets) {
[TGRTweet importFromDictionary:tweetDictionary inManagedObjectContext:self.managedObjectContext];
}
NSError *error = nil;
BOOL succeeded = [self.managedObjectContext save:&error];
if (!succeeded) {
NSLog(@"Error saving timeline: %@", [error localizedDescription]);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment