Here is what I have so far. The only thing this needs to do is detect the date, and then depending on what that date is, post something different to Facebook. I only have it set up with one If statement for the moment just for testing. When I run it, it doesn't post the else statement, since today isn't Sunday.
Code:
-(IBAction)evite {
NSDateFormatter *formatter = [[NSDateFormatter alloc] init];
[formatter setDateFormat:@"MM-dd-yyyy HH:mm"];
todaysDate = [formatter stringFromDate:[NSDate date]];
NSString *day = [todaysDate substringWithRange:NSMakeRange (3, 2)];
if (day = "Sunday") {
NSURL *url = [NSURL URLWithString:@"http://www.marsalisavenuecoc.org"];
SHKItem *item = [SHKItem URL:url title:@"Join me @ Marsalis Avenue Church of Christ this Sunday! Bible Class @8:45 Worship @10:00! Click link for our website."];
SHKActionSheet *actionSheet = [SHKActionSheet actionSheetForItem:item];
[actionSheet showInView:self.tabBarController.view];
}
else
{NSURL *url = [NSURL URLWithString:@"http://www.marsalisavenuecoc.org"];
SHKItem *item = [SHKItem URL:url title:@"Join me @ Marsalis Avenue Church of Christ this Wednesday! Bible Class @8:45 Worship @10:00! Click link for our website."];
SHKActionSheet *actionSheet = [SHKActionSheet actionSheetForItem:item];
[actionSheet showInView:self.tabBarController.view];}
}