Skip to content

Instantly share code, notes, and snippets.

@aaustin
Created September 7, 2016 01:41
Show Gist options
  • Save aaustin/196e52e901aac9152c984acbcb8e6afe to your computer and use it in GitHub Desktop.
Save aaustin/196e52e901aac9152c984acbcb8e6afe to your computer and use it in GitHub Desktop.
BranchLinkProperties *linkProperties = [[BranchLinkProperties alloc] init];
linkProperties.feature = @"sharing";
linkProperties.channel = @"facebook"; // make sure to specify the channel!
[linkProperties addControlParam:@"$desktop_url" withValue:@"http://example.com/video/12345"];
[branchUniversalObject getShortUrlWithLinkProperties:linkProperties andCallback:^(NSString *url, NSError *error) {
if (!error && url) {
// Drop the URL into your share message and let the user share it to the world
NSLog(@"success getting url! %@", url);
}
}];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment