Skip to content

Instantly share code, notes, and snippets.

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

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

Select an option

Save evanbarry/186f4b59281c2a15ada6 to your computer and use it in GitHub Desktop.
// Initialize the param and feature variable
NSString *feature = @"invite";
NSMutableDictionary *params = [[NSMutableDictionary alloc] init];
[params setObject:@"1452" forKey:@"station_id"];
[params setObject:@"https://s3-us-west-1.amazonaws.com/myapp/radiostation.jpg" forKey:@"$og_image_url"];
[params setObject:@"Check out my favorite station on iHeartRadio" forKey:@"$og_description"];
[params setObject:@"Wild 94.9" forKey:@"$og_title"];
UIActivityItemProvider *itemProvider = [Branch getBranchActivityItemWithParams:params andFeature:feature];
UIActivityViewController *shareViewController = [[UIActivityViewController alloc] initWithActivityItems:@[itemProvider] applicationActivities:nil];
// Present the share sheet!
[self.navigationController presentViewController:shareViewController animated:YES completion:nil];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment