Branch.io can't find my app, when I try to open link in Facebook App. It always redirects to the App Store, even when our app is already installed on the device. I've read https://blog.branch.io/deep-linking-from-facebook-in-2017/ and implemented Deepviews, but even from there I can't get into the app. It still opens App Store.
I assume that the problem is in our Branch.io configuration, but I can't find it.
Notes:
- I've implemented Universal Links and they work fine (except this problem with Facebook).
- When I press on "Open in Safari" in the Facebook app, it also works fine.
- Deepview always shows "Get the app" instead of "Open app", when the app is already installed.
This is how I create the link:
- (BranchUniversalObject *)generateBranchObjectFor:(MBMediaObject *)object {
NSArray<NSString *> *pathComponents = [object.shareLink pathComponents];
NSString *uid = [[pathComponents subarrayWithRange:NSMakeRange(pathComponents.count-2, 2)] componentsJoinedByString:@"/"];
BranchUniversalObject *branchObject = [[BranchUniversalObject alloc] initWithCanonicalIdentifier:uid];
branchObject.title = object.name;
branchObject.imageUrl = object.imageURL.absoluteString;
if ([object isKindOfClass:MBSong.class]) {
branchObject.contentDescription = ((MBSong *)object).artistName;
} else if ([object isKindOfClass:MBAlbum.class]) {
branchObject.contentDescription = ((MBAlbum *)object).artist.name;
}
return branchObject;
}
- (BranchLinkProperties *)generateBranchLinkPropertiesForObject:(MBMediaObject *)object channel:(NSString *)channel {
BranchLinkProperties *properties = [BranchLinkProperties new];
properties.feature = @"sharing";
properties.channel = channel;
[properties addControlParam:@"$deeplink_path" withValue:[[object.shareLink stringByReplacingOccurrencesOfString:@"http://" withString:@""] stringByReplacingOccurrencesOfString:@"https://" withString:@""]];
return properties;
}
NSString *shortURLString = [[self generateBranchObjectFor:object] getShortUrlWithLinkProperties:[self generateBranchLinkPropertiesForObject:object channel:@"twitter"]];
And this is our link settings: