Advertisement
Guest User

branch link creation

a guest
May 31st, 2016
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  NSDictionary *param = @{@"sourceId" : sourceId,
  2.                             @"source" : sourceType,
  3.                             @"referral" : [[SecurePersistentStore sharedInstance] referralKey],
  4.                             @"$og_image_url" : imageUrl,
  5.                             @"$og_description" : caption,
  6.                             @"$og_title" : @"PocketCause"};
  7.    
  8.     [[Branch getInstance] getShortURLWithParams:param
  9.                                      andChannel:@"mobile_app"
  10.                                      andFeature:@"share_profile"
  11.                                     andCallback:^(NSString *url, NSError *error) {
  12.                                         [self hideLoadingView];
  13.                                         if (!error) {
  14.                                             NSURL *shareUrl = [NSURL URLWithString:url];
  15.                                            
  16.                                             PostURLShareItem *urlItem = [[PostURLShareItem alloc] initWithURL:shareUrl];
  17.                                             PostCaptionShareItem *captionItem = [[PostCaptionShareItem alloc] initWithCaption:caption andURL:shareUrl.absoluteString];
  18.                                            
  19.                                             [self presentActivityWithURLShareItem:urlItem
  20.                                                                  captionShareItem:captionItem
  21.                                                               completitionHandelr:handler];
  22.                                         }
  23.                                     }];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement