I am trying to open facebook app via AppLinks url , it opens user profile/page but does not show button "back to referer app" , I am providing "referer_app_link" data , I have generated JSON by this reference http://applinks.org/documentation/#applinknavigationprotocol
NSDictionary *dict = @{
@"target_url" : @"fb://profile/USER_ID",
@"referer_app_link" : @{
@"target_url" : @"MY WEBSITE",
@"url" : @"CALLBACK URL",
@"app_name" : @"MY APP NAME",
@"app_store_id" : @"MY APP STORE ID"
}
};
NSData *data = [NSJSONSerialization dataWithJSONObject:dict options:0 error:nil];
NSString *jsonString = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
jsonString = [jsonString stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
NSString *stringUrl = [NSString stringWithFormat:@"fb://applinks?al_applink_data=%@",jsonString];
NSLog(@"String url is %@",stringUrl);
NSURL *url = [NSURL URLWithString:stringUrl];
if([[UIApplication sharedApplication] canOpenURL:url]) {
[[UIApplication sharedApplication] openURL:url];
} else {
NSLog(@"Cant open %@",url);
}
any ideas ? is Facebook supposed to have "back button" at all ? my url scheme is set up correctly ...
Update: NSDictionary contains all valid values , I dont want to publish them at the moment , but url , name , store id ... etc all are valid
Update #2: Since iOS 9 , this is done by iOS System automatically.