當我嘗試在Facebook應用程序中打開鏈接時,Branch.io無法找到我的應用程序。它總是重定向到App Store,即使我們的應用程序已經安裝在設備上。我已閱讀https://blog.branch.io/deep-linking-from-facebook-in-2017/並實施了Deepviews,但即使從那裏我也無法進入該應用。它仍然打開App Store。Facebook iOS中的Branch.io鏈接應用程序
我假設問題出現在我們的Branch.io配置中,但我找不到它。
注:
- 我實現了通用的鏈接和他們工作得很好(除了這個問題與Facebook)。
- 當我在Facebook應用程序中按下「在Safari中打開」時,它也可以正常工作。
- 當應用程序已安裝時,Deepview總是顯示「獲取應用程序」而不是「打開應用程序」。
這是我如何創建鏈接:
- (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"]];
這是我們的鏈接設置:
我有完全相同的問題。深度鏈接來自Safari,但不是來自Facebook。我跟着你一樣的博客文章,不知道爲什麼它不起作用。我嘗試編輯deepview HTML以將屬性「al:web:should_fallback」添加爲false,但仍然無效。我現在很難過。分公司的文件非常混亂。 –