Skip to content

Instantly share code, notes, and snippets.

@evanbarry
Created July 22, 2015 20:30
Show Gist options
  • Select an option

  • Save evanbarry/a158aea5ad6edbd2d0a6 to your computer and use it in GitHub Desktop.

Select an option

Save evanbarry/a158aea5ad6edbd2d0a6 to your computer and use it in GitHub Desktop.
NSMutableDictionary *branchDict = [[NSMutableDictionary alloc] init];
[params setObject:@"1452" forKey:@"referring_user_id"];
[params setObject:@"Alex Austin" forKey:@"referring_user_name"];
[params setObject:@"http://graph.facebook.com/517267866/picture?type=large" forKey:@"referring_user_pic"];
[[Branch getInstance] getShortURLWithParams:branchDict
andChannel:@"facebook"
andFeature:@"referral"
andCallback:^(NSString *url, NSError* error) {
if ([FBSDKAppInviteDialog canShow]) {
FBSDKAppInviteContent *content =[[FBSDKAppInviteContent alloc] init];
content.appLinkURL = [NSURL URLWithString:url];
[FBSDKAppInviteDialog showWithContent:content
delegate:self];
}
}];
@bksasuke
Copy link

Is there is a wrong typography error here ? I see you alloc a dictionary name "branchDict" but set info to a dictionary name "params".
My code also not working if I correct the two above ns dictionary to one name. The received invite user not get the info in the initial dictionary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment