The facebook App Link is only working after rescraping the url with the facebook url debug tool. Without this step, the facebook app opens the page in the internal web browser. After the rescrape, both the app switching and the navigation to the app store works fine (in case the application is not installed). The head section of the shared link looks like this:
<head>
<meta charset="utf-8">
<title>Title</title>
<meta property="fb:app_id" content="1234567890123456">
<meta property="og:url" content="http://www.myawesomeapp.com/model/{{$model->id}}">
<meta property="og:type" content="website">
<meta property="og:title" content="MyAwesomeApp">
<meta property="og:image" content="{{$model->image}}"/>
<meta property="og:description" content="{{$model->text}}">
<meta property="og:site_name" content="MyAwesomeApp">
<!--applink-->
<meta property="al:ios:url" content="myawesomeapp://model/{{$model->id}}" />
<meta property="al:ios:app_store_id" content="<<random app id for testing>>" />
<meta property="al:ios:app_name" content="MyAwesomeApp" />
<meta property="al:web:should_fallback" content="false" />
The link is shared from the iOS app in the following way:
FBSDKShareLinkContent *content = [[FBSDKShareLinkContent alloc] init];
[content setContentDescription:model.text];
[content setContentURL:[NSURL URLWithString:[NSString stringWithFormat:@"http://www.myawesomeapp.com/model/%ld", model.id]]];
content.imageURL = model.image ? [NSURL model.image] : nil;
[FBSDKShareAPI shareWithContent:content delegate:self];
Am I doing something wrong or is it a facebook bug? Or maybe I have to automatically call the rescraping tool of after each link shared?