0

I'm using Flutter Sdk and have integrated the necessary code to receive Facebook Deferred deep link.

using below pluging for receiving app links

flutter_facebook_app_links: ^3.0.0+5

my deferred deep link

example://prod/https://example.com/pages/landing-48?ad=74
 Future<String?> initFBDeferredDeeplinks() async {
    String? deepLinkUrl;
    // Platform messages may fail, so we use a try/catch PlatformException.
    try {
      deepLinkUrl = await FlutterFacebookAppLinks.initFBLinks();
      if (Platform.isIOS) {
        deepLinkUrl = await FlutterFacebookAppLinks.getDeepLink();
      }

      if (deepLinkUrl != null && deepLinkUrl.isNotEmpty) {
        if (kDebugMode) {
          print("initFBDeferredDeeplinks $deepLinkUrl");
        }

      
        if (deepLinkUrl.contains("example://prod/")) {
          return deepLinkUrl.split("example://prod/").last;
        } 
        return deepLinkUrl;
      } else {
        return null;
      }
    } catch (e) {
      if (kDebugMode) {
        print(e);
      }
      return null;

      /// in case of error...
    }
  }

The Deferred deeplink i send from App Ads Helper tool works but the Facebook ad doesnt return the deferred deeplink.

I just receive the Install referrer data with no deferred deep link url.

flutter doctor

[✓] Flutter (Channel stable, 3.7.7, on macOS 13.3.1 22E261 darwin-x64, locale en-GB)
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0-rc1)
[✓] Xcode - develop for iOS and macOS (Xcode 14.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2021.3)
[✓] VS Code (version 1.77.3)
[✓] Connected device (3 available)
[✓] HTTP Host Availability

• No issues found!

Expected the same response in live ad as the App Ads helper tool

rajeshzmoke
  • 140
  • 1
  • 6

0 Answers0