Created
August 16, 2013 00:39
-
-
Save TiernanKennedy/6246273 to your computer and use it in GitHub Desktop.
Invite Array of friends to Facebook Dialog
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NSMutableDictionary* params = [[NSMutableDictionary alloc] init]; | |
if([invitations count] != 0){ | |
NSString * stringOfFriends = [invitations componentsJoinedByString:@","]; | |
[params setObject:stringOfFriends forKey:@"to"]; | |
NSLog(@"%@", params); | |
} | |
[FBWebDialogs presentRequestsDialogModallyWithSession:nil | |
message:[NSString stringWithFormat:@"Come join me on iFlipd!"] | |
title:nil | |
parameters:params | |
handler:^(FBWebDialogResult result, NSURL *resultURL, NSError *error) { | |
if (error) { | |
// Case A: Error launching the dialog or sending request. | |
NSLog(@"Error sending request."); | |
} else { | |
if (result == FBWebDialogResultDialogNotCompleted) { | |
// Case B: User clicked the "x" icon | |
NSLog(@"User canceled request."); | |
} else { | |
NSLog(@"Request Sent. resultURL %@", resultURL); | |
} | |
}}]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment