Skip to content

Instantly share code, notes, and snippets.

@aaustin
Created September 21, 2015 17:46
Show Gist options
  • Save aaustin/5fad5876e98ac41ecc18 to your computer and use it in GitHub Desktop.
Save aaustin/5fad5876e98ac41ecc18 to your computer and use it in GitHub Desktop.
NSString *shareString = @"Super amazing thing I want to share!";
NSDictionary*params = [[NSDictionary alloc] initWithObjects:@[
@"1234",
@"here is another object!!",
@"Kindred",
@"https://s3-us-west-1.amazonaws.com/branchhost/mosaic_og.png"]
forKeys:@[
@"object_id",
@"key2",
@"$og_title",
@"$og_image_url"]];
UIActivityItemProvider *itemProvider = [Branch getBranchActivityItemWithParams:params feature:@"object_share"];
UIActivityViewController *shareViewController = [[UIActivityViewController alloc] initWithActivityItems:@[shareString, itemProvider] applicationActivities:nil];
[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