This file contains 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
<script type="text/javascript"> | |
(function(b,r,a,n,c,h,_,s,d,k){if(!b[n]||!b[n]._q){for(;s<_.length;)c(h,_[s++]);d=r.createElement(a);d.async=1;d.src="https://cdn.branch.io/branch-latest.min.js";k=r.getElementsByTagName(a)[0];k.parentNode.insertBefore(d,k);b[n]=h}})(window,document,"script","branch",function(b,r){b[r]=function(){b._q.push([r,arguments])}},{_q:[],_v:1},"addListener applyCode banner closeBanner creditHistory credits data deepview deepviewCta first getCode init link logout redeem referrals removeListener sendSMS setBranchViewData setIdentity track validateCode".split(" "), 0); | |
branch.init('YOUR-BRANCH-KEY'); | |
</script> |
This file contains 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
<?xml version="1.0" encoding="UTF-8"?> | |
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> | |
<url> | |
<loc>https://your-website.com/path/to/awesome/content</loc> | |
</url> | |
<url> | |
<loc>https://your-website.com/path/to/awesome/content-2</loc> | |
</url> | |
<url> |
This file contains 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
^(NSDictionary *params, NSError *error) { | |
if (!error && [params objectForKey:@"coupon_id") { | |
// show the view controller to show the coupon clicked on | |
NSLog(@"params: %@", params.description) | |
} | |
}]; |
This file contains 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 *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" |
This file contains 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
^(NSDictionary *params, NSError *error) { | |
if (!error && [params objectForKey:@"station_id") { | |
// show the view controller that plays a radio station | |
NSLog(@"params: %@", params.description) | |
} | |
}]; |
This file contains 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
// 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! |
This file contains 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
[[Branch getInstance] getShortURLWithParams:@{@"object_id": @"1234"} andChannel:@"sms" andFeature:BRANCH_FEATURE_TAG_SHARE andCallback:^(NSString *url, NSError *error) { | |
if (!error) NSLog(@"got my Branch link to share: %@", url); | |
}]; |
This file contains 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
Branch *branch = [Branch getInstance]; | |
[branch initSessionWithLaunchOptions:launchOptions andRegisterDeepLinkHandler:^(NSDictionary *params, NSError *error) { | |
if (!error) { | |
// params are the deep linked params associated with the link that the user clicked -> was re-directed to this app | |
// params will be empty if no data found | |
// ... insert custom logic here ... | |
NSLog(@"params: %@", params.description) | |
} | |
}]; |
This file contains 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
<html prefix="og: http://ogp.me/ns#"> | |
<head> | |
<title>The Rock (1996)</title> | |
<meta property="og:title" content="The Rock" /> | |
<meta property="og:type" content="video.movie" /> | |
<meta property="og:url" content="http://www.imdb.com/title/tt0117500/" /> | |
<meta property="og:image" content="http://ia.media-imdb.com/images/rock.jpg" /> | |
<meta property="al:ios:app_store_id" content="342792525" /> | |
<meta property="al:ios:url" content="imdb://title/tt0117500" /> |
NewerOlder