1.1.1 • Published 4 years ago

react-native-facebook-app-link v1.1.1

Weekly downloads
2
License
MIT
Repository
github
Last release
4 years ago

react-native-facebook-app-link

Easily fetch facebook deferred app link url and handle it without native implementation.

Inspired by Maftalion.

Installation

yarn add react-native-fbsdk react-native-facebook-app-link
cd ios
pod install

In android/build.gradle, check facebookSdkVersion

// android/build.gradle
buildscript {
    ext {
          // facebookSdkVersion should be in 7.0.0 ~ 8.0.0
          facebookSdkVersion = "7.1.0"
           ...

Upgrading from old version of fbsdk, you might want to call pod update for iOS.

pod update FBSDKShareKit FBSDKLoginKit FBSDKCoreKit

Usage

import FacebookAppLink from 'react-native-facebook-app-link';

const url = await FacebookAppLink.fetchUrl();

if(url){
  // do whatever with the url.
}

If you follow the Facebook GDPR Compliance Best Practices and set the AutoInitEnabled flag to false, initialize the SDK before fetchUrl:

import FacebookAppLink from 'react-native-facebook-app-link';

// get user consent
FacebookAppLink.initializeSDK();
const url = await FacebookAppLink.fetchUrl();

if(url){
  // do whatever with the url.
}

API

namedescription
fetchUrlFetch deferred app link from Facebook
initializeSDKInitialize the Facebook SDK (For FB GDPR Compliance Best Practices)

Reference

Maftalion's answer in react-native-fbsdk issue #648

FACEBOOK for developers - Add Deep Links to Your App Ad - Step2

FB SDK Best Practices for GDPR Compliance

1.1.1

4 years ago

1.1.0

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago