1

I have a problem with the integration of the Facebook deep linking (from a article to my app). I followed the documentation (https://developers.facebook.com/docs/applinks) step by step, there is nothing to do, it doesn't work..

So in my website, I add the metadata :

<meta property="fb:app_id" content="...">
<meta property="al:ios:url" content="appname://event?event_id=127">
<meta property="al:ios:app_name" content="app name">

In my app delegate :

- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation {



BFURL *parsedUrl = [BFURL URLWithInboundURL:url sourceApplication:sourceApplication];
if ([parsedUrl appLinkData]) {
    // this is an applink url, handle it here
    NSURL *targetUrl = [parsedUrl targetURL];
    [[[UIAlertView alloc] initWithTitle:@"Received link:"
                                message:[targetUrl absoluteString]
                               delegate:nil
                      cancelButtonTitle:@"OK"
                      otherButtonTitles:nil] show];
}

return [[FBSDKApplicationDelegate sharedInstance] application:application
                                                      openURL:url
                                            sourceApplication:sourceApplication
                                                   annotation:annotation
        ];}

Did you have any idea why my app wasn't open ? I also configure my Facebook app settings.

icedwater
  • 4,701
  • 3
  • 35
  • 50

1 Answers1

1

Change <meta property="al:ios:url" content="appname://event?event_id=127"> to <meta property="al:ios:url" content="myApp://event?event_id=127">

Your app will recognize the scheme set by your url which is the myApp in this case (You can change it your desired string but both should match). So this should be present in your app's plist to recognize the incoming call to open.

<key>CFBundleURLTypes</key>
<array>
    <dict>
        <key>CFBundleTypeRole</key>
        <string>Editor</string>
        <key>CFBundleURLSchemes</key>
        <array>
            <string>myApp</string>
            <string>fbXXXXXXXXXXXXXXXX</string>
        </array>
    </dict>
</array>
Mr. Bean
  • 4,221
  • 1
  • 19
  • 34
  • It doesn't work ... When you say myApp, I have to change myApp by the name of my app ? – Léo Vallet Jan 31 '16 at 20:42
  • mo bro u dont have to change app name what i suggested is schema name through which your app will identify the call back urls from facebook..it should match – Mr. Bean Feb 01 '16 at 09:17
  • Cheers ! it was helpful, all i make the web meta url and app schema equal for a callback by FB – Er. Joshi Dec 06 '16 at 05:24