패키지, 저장소 및 앱 카테고리 검색

패키지 상세v3.1.0

flutter_facebook_app_links

Facebook 광고에서 FB App Links SDK를 사용하여 지연된 딥 링크를 캐치하는 플러터 플러그인입니다.

AndroidiOS
30일 다운로드
2.9천
좋아요
41
Pub 점수
140

패키지 설치

flutter pub add flutter_facebook_app_links

패키지 개요

공개 정보를 바탕으로 생성한 선택 가이드입니다.

Flutter 플러그인으로, Facebook 앱 링크 SDK를 사용하여 Facebook 광고에서 지연된 딥 링크를 수신하고 처리할 수 있습니다. 개발자는 Facebook 캠페인에서의 사용자 상호작용을 추적하고, 앱이 사전에 설치되지 않은 경우에도 앱 내 특정 콘텐츠로 사용자를 안내할 수 있습니다. 이 플러그인은 Android 및 iOS 플랫폼 모두에서 작동하며, Facebook의 추적 및 딥 링크 인프라와 원활하게 통합됩니다.

사용 사례

  • Facebook 광고 클릭 리다이렉트 처리
  • 딥 링크를 통한 캠페인 성능 추적
  • 설치 후 딥 링크 활성화
  • 타겟 광고를 통한 재참여 지원
  • 개인화된 사용자 경험을 촉진하는 것

주요 기능

  • 지연된 딥 링크 지원
  • Facebook 앱 링크 SDK 통합
  • 크로스 플랫폼(안드로이드 및 iOS)
  • 링크 처리를 위한 간단한 API
  • 앱 시작 시 자동 링크 캡처

적합한 대상

  • 페이스북 광고를 사용하는 마케팅 팀
  • 캠페인 추적을 필요로 하는 앱
  • 추천 또는 온보딩 흐름을 구축하는 개발자
  • 동적 콘텐츠 타겟팅을 갖춘 제품
  • 사용자 확보에 집중하는 모바일 앱

고려 사항

  • Facebook 개발자 콘솔에서 Facebook App Links 설정이 필요합니다
  • 올바른 URL 스키마 및 앱 링킹 구성이 필요합니다
  • 일부 기기에서는 추가 권한이 필요할 수 있습니다
  • 페이스북 광고 소스만 제한
  • Facebook SDK 버전 호환성에 따라 다름

원본 README

연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.

Flutter Facebook App Links

Flutter plugin for Facebook App Links SDK. This plugin must be used to catch deferred deeplinks sent from Facebook after your app has been installed from a FB ADS.

Getting Started

First of all, if you don't have one already, you must first create an app at Facebook developers: https://developers.facebook.com/

Get your app id (referred to as [APP_ID] below)

Configure Android

For Android configuration, you can follow the same instructions of the Flutter Facebook App Events plugin: Read through the "Getting Started with App Events for Android" tutuorial and in particular, follow step 2 by adding the following into /app/res/values/strings.xml (or into respective debug or release build flavor)

configure inside android/app/main/res/values/strings.xml the above values (without square brackets):

<string name="facebook_app_id">[your_app_id]</string>
<string name="facebook_client_token">[your_client_token]</string>

then, add that string resource reference to your main AndroidManifest.xml file, within ...

<meta-data android:name="com.facebook.sdk.ApplicationId" android:value="@string/facebook_app_id" />
<meta-data android:name="com.facebook.sdk.ClientToken" android:value="@string/facebook_client_token"/>
Configure iOS

For iOS configuration, you can follow the same instructions of the Flutter Facebook App Events plugin: Read through the "Getting Started with App Events for iOS" tutuorial and in particular, follow step 4 by opening info.plist "As Source Code" and add the following

  • If your code does not have CFBundleURLTypes, add the following just before the final </dict> element:
<key>CFBundleURLTypes</key>
<array>
  <dict>
  <key>CFBundleURLSchemes</key>
  <array>
    <string>fb[APP_ID]</string>
  </array>
  </dict>
</array>
<key>FacebookAppID</key>
<string>[APP_ID]</string>
<key>FacebookDisplayName</key>
<string>[APP_NAME]</string>
  • If your code already contains CFBundleURLTypes, insert the following:
<array>
 <dict>
 <key>CFBundleURLSchemes</key>
 <array>
   <string>fb[APP_ID]</string>
 </array>
 </dict>
</array>
<key>FacebookAppID</key>
<string>[APP_ID]</string>
<key>FacebookDisplayName</key>
<string>[APP_NAME]</string>

## How to use

import 'dart:io' show Platform;
...
...
/// FB Deferred Deeplinks
void 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();

    /// do what you need with the deeplink...
    /// ...
  }catche(e){
    /// in case of error...
  }
}

About Facebook App Links

Please refer to the official SDK documentation for Android and iOS.

IMPORTANT NOTES

User privacy [DO NOT IGNORE]

How documented on Facebook docs, starting from v5.0.0 of the SDK, they introduce a flag for disabling automatic SDK initialization to be GDPR compliant. It means that you should collect user consent before you use call the method initFBLinks() of this plugin and save the user choice. Moreover, you should give the user a chance to revoke their consent in the future. Please keep in mind that this plugin uses FacebookSDK.setAutoInitEnabled(true) in Android and Settings.isAutoInitEnabled = true in iOS by default, so the consent must be granted in your Dart code before you call FlutterFacebookAppLinks.initFBLinks().

Testing deferred deep links

To correctly test deferred deeplinks, DO NOT use the preview of your FB ADS campaign. Instead, use this tool APP ADS HELPER

At the end of the page you will find a "Test deep link" button, click on it and type your custom url scheme (deeplink), for example: myawesomeapp://screen/login

Select the second checkbox (or both). Remember that to make it works, you'll need the Facebook app installed on your device (Android or iPhone) and you must be logged in with the same account you're using in the Facebook Developers console.

Your app doesn't need to be published on the store, simply uninstall it and re-install using Android Studio/VSCode or XCode after you've sent the deferred deep link.

카테고리

소스 저장소

이 패키지를 사용하는 프로젝트

아직 데이터가 없습니다.