Skip to content

Commit

Permalink
Closes #123: Show OpenPhoto url
Browse files Browse the repository at this point in the history
  • Loading branch information
patricksan committed Apr 16, 2012
1 parent 25dea4a commit ed6b013
Showing 1 changed file with 3 additions and 14 deletions.
17 changes: 3 additions & 14 deletions OpenPhoto/NewestPhotosTableViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -241,20 +241,9 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N

// parameters from upload
NSArray *keys = [NSArray arrayWithObjects:@"url", @"title",@"type",nil];
NSString *shareDetails;

if ([upload.twitter boolValue]){
//twitter: share the link
shareDetails = [responsePhoto objectForKey:@"pathOriginal"];
}else {
//facebook: share the url
shareDetails = [responsePhoto objectForKey:@"url"];
}

NSArray *objects= [NSArray arrayWithObjects:[NSString stringWithFormat:@"%@", shareDetails], [NSString stringWithFormat:@"%@", [responsePhoto objectForKey:@"title"]],[upload.twitter boolValue] ? @"Twitter" : @"Facebook", nil];

[[NSNotificationCenter defaultCenter] postNotificationName:kNotificationShareInformationToFacebookOrTwitter object:[NSDictionary dictionaryWithObjects:objects forKeys:keys] ];

NSString *shareDetails = [responsePhoto objectForKey:@"url"];
NSArray *objects= [NSArray arrayWithObjects: shareDetails, [NSString stringWithFormat:@"%@", [responsePhoto objectForKey:@"title"]],[upload.twitter boolValue] ? @"Twitter" : @"Facebook", nil];
[[NSNotificationCenter defaultCenter] postNotificationName:kNotificationShareInformationToFacebookOrTwitter object:[NSDictionary dictionaryWithObjects:objects forKeys:keys] ];
}

#ifdef DEVELOPMENT_ENABLED
Expand Down

0 comments on commit ed6b013

Please sign in to comment.