9
votes

I have a problem with Facebook Deferred Deep Linking on iOS. DEEP LINKING WORKS, BUT DEFERRED DEEP LINKING DOESN'T WORK. I have read a lot about this problem and still cannot find the solution.

I have set up deep linking and it works. When I also try to test deep linking on App Ads Helper and click on "Test deep link", enter deep link and click on "Send notification", I receive a notification on Facebook which opens my app, and this deep linking works. But, when I click "Select Deferred", I don't receive anything. I try to delete app and reinstall it, but [FBSDKAppLinkUtility fetchDeferredAppLink:...]; method doesn't get any deferred deep link after new install.

[FBSDKAppLinkUtility fetchDeferredAppLink:^(NSURL *url, NSError *error) {
        if (error) {
            NSLog(@"Received error while fetching deferred app link %@", error);
        }
        if (url) {
            [[UIApplication sharedApplication] openURL:url options:@{} completionHandler:^(BOOL success) {

            }];
        }
    }];

In this example, url is always nil.

Note: I still don't have app on Store, so I entered a Apple Id of another application. Even if I had my own app on Store, how could I test deferred deep linking without publishing app on Store?

Also, I have read on Facebook documentation that:

Beginning with iOS 10, iOS doesn't support deferred deep linking, so you can't open content other than the starting screen once people have installed the app. (Source)

So, I am not sure if this is even possible.

Also, I have read another articles on Stackoverflow, but there are not answer that I am looking for, i.e. they look incomplete, or I just don;t see the answer between the lines:

How to use facebook deferred deep linking feature for new installs and to test the same before publishing iOS App to appStore? -> Answers to this question aren't what I am looking for:

If you want to verify deferred links then check 'Send Deferred' in the dialog. So, after doing this you need to uninstall the app(if already present) and then install again from the app store. The device in which you will be testing this should have facebook app installed and logged in with the account from which you had sent the "deferred deep link request" from app-ads helper. Now when you open your app, you should bee able to see your deferred deep link functionality working.

This doesn't work, so that's why I am asking this question.

Also, I have found that I could use Tune SDK for deferred deep linking:

...this is not a problem with the iOS 10 operating system itself. Deferred deep linking works just fine for iOS 10 using the TUNE SDK. (Source)

Also, I have found that I could use Branch.io for deferred deep linking:

With Branch, you get all the basic routing of a Universal Link plus the deferred deep linking and install attribution for the new user acquisition flow. (Source)

I haven't tried Tune and Branch.io. I would like to use Facebook ads and perform deferred deep linking without third party solutions. Is it possible with Facebook, and how to test deferred deep linking for Facebook on iOS?

6

6 Answers

2
votes

It worked for us after resetting advertising identifier. Maybe internally they are preventing attribution in the same app twice if it is the same advertising identifier. So go to settings and reset your advertising identifier before testing. Also make sure the phone has not opted out of tracking.

2
votes

For me, the answer was in my iPhone settings. I had "Limit Ad Tracking" enabled. I don't have much documentation proof that this was causing the issue but after changing it, it is now working. It's worth testing it yourself.

On your iPhone go to: Settings -> Privacy -> Advertising (at the bottom of the page)

There you should ensure that "Limit Ad Tracking" is set to off.

You should then recieve a URL if you have your app URL Scheme correctly set (see here if not) code which for swift should look like this:

AppLinkUtility.fetchDeferredAppLink { [weak self] (url, error) in
        guard let self = self else {return}
        if (url != nil) {
            
        } else if error != nil {
            print("Error: \(error!.localizedDescription)")
        }
}

To test the deferred links, you can go here.

1
votes

A bit late, but per your comment on the previous answer: Once you receive the message:

The link has been queued and is pending you doing a first app launch on your device. This means you need to delete the app, then re-install and open your app. Please first verify your app can handle deferred deep linking by checking the iOS and Android setup information located above.

  1. Delete the application from your device
  2. Open Facebook notifications from your device, you should have a deeplink notification
  3. Selecting the deeplink notification should direct you to the appropriate app store to install the application again
  4. Once installed, launching the application should trigger the intended 'Deferred' deep link
1
votes

For deferred deep link to work, you also need to be logged in on the Facebook app. The ads helper tool: https://developers.facebook.com/tools/app-ads-helper/ knows your logged in user id on facebook.com. Facebook then uses this info to match your id, the app and the device information and returns an appLink back to your app if so.

Unfortunately, that's not possible on simulator given the limitation to install other apps like Facebook.

Your only option is to use a real device and build your XCode project on it. Make sure you have Facebook installed and that you are logged in with the same user as on your desktop web browser.

0
votes

If you are running Facebook ads with Deep linking enabled, you can test deferred deep linking setup here: https://developers.facebook.com/tools/app-ads-helper/

You will need to select your app, then you should be able to access the deep-link tester at the bottom of the page (in which you can also select deferred)

enter image description here

0
votes

Additional info:

So you need to deploy the app to the store? – locoboy Aug 7 '15 at 16:38

For testing Deep Link or Deferred Deep Link as they said before me:

  • deploy to store not required, use FB Ads panel for testing
  • check just in case statistic for app installs (not equal zero) - may be AppEvents (automatically logged) doesn't work correct (keep in mind, in the calculation of statistics, there may also be a delay)
  • Install Facebook application for your device, auth in using the same profile that you use to send notifications (run FB app in background)
  • Select both 'Send Notification' and 'Send Deferred' check marks (or check only 'Send Deferred' - results will available after manual app reinstall, and don't forgot trigger FBSDKAppEvents activateApp)
  • Example after successful sending
  • The main objective - after sending the message you will see it in Facebook! app notifications, with logo + text "Tap to launch your deep link"
  • Tap on notification