A flutter plugin to get facebook deep links and log app events using the latest Facebook SDK to include support for iOS 14

Overview

Facebook Sdk For Flutter

GitHub code size GitHub followers GitHub contributors Linkedin LinkedIn GitHub GitHub

facebook_sdk_flutter allows you to fetch deep links, deferred deep links and log facebook app events.

This was created using the latest facebook SDK to include support for iOS 14. The plugin currently supports app events and deeps links for iOS and Android.

Prerequisites

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)

For IOS

  • If your code does not have CFBundleURLTypes, add the following just before the final 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>[DISPLAY_NAME]</string>
    <key>FacebookAutoLogAppEventsEnabled</key>
    <true/>
    <key>FacebookAdvertiserIDCollectionEnabled</key>
    <true/>

For Android

  • Add the following to your strings.xml file

<string name="facebook_app_id">[APP_ID]</string>
<string name="fb_login_protocol_scheme">fb[APP_ID]</string>

  • Add the following meta tag to the application element in AndroidManifest.xml

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

  • Add the following element in AndroidManifest.xml

<uses-permission android:name="android.permission.INTERNET"/>

  • Don't forget to replace [APP_ID] with your Application ID
Comments
  • CocoaPods could not find compatible versions for pod

    CocoaPods could not find compatible versions for pod "FBSDKCoreKit"

    [!] CocoaPods could not find compatible versions for pod "FBSDKCoreKit": In Podfile: flutter_facebook_auth (from .symlinks/plugins/flutter_facebook_auth/ios) was resolved to 4.3.0, which depends on FBSDKCoreKit (~> 13)

    flutter_facebook_sdk (from `.symlinks/plugins/flutter_facebook_sdk/ios`) was resolved to 0.0.1, which depends on
      FBSDKCoreKit (~> 9.1.0)
    
    opened by MuraliThangavel 1
  • initializeSDK and null check error

    initializeSDK and null check error

    The setAdvertiserTrackingEnabled was throwing a null check error

    In iOS I've got this error "FBSDKLog: FBSDKGraphRequestConnection cannot be started before Facebook SDK initialized", so I need to implement this method "initializeSDK" to work

    opened by EduardoNatale 1
  • invokeMethod(

    invokeMethod("setAdvertiserTracking"... can return nil

    When calling setAdvertiserTracking, it can return nil according to this line: https://github.com/saadfarhan124/flutter_facebook_sdk/blob/master/ios/Classes/SwiftFlutterFacebookSdkPlugin.swift#L277

    However, on the dart side, the code expect a boolean: https://github.com/saadfarhan124/flutter_facebook_sdk/blob/master/lib/flutter_facebook_sdk.dart#L198

    opened by hermanccw 1
  • Error when running build-ipa

    Error when running build-ipa

    I have this error

    SwiftFlutterFacebookSdkPlugin.swift:178:47: error: 'nil' requires a contextual type
    	ApplicationDelegate.initializeSDK(nil)
    

    Does anybody else encountered this issue?

    opened by imajercsik 2
  • events not showing from ios in events manager

    events not showing from ios in events manager

    i add plugin and info plist ios and android , but no events is appeared in events manager from ios as simulator and ios real device , ,any suggestion to sole this problem , how to make sure the advertiser tracking is enabled ?

    opened by AhkamKhalaaf 1
  • 'onNewIntent' overrides nothing, Class 'FlutterFacebookSdkPlugin' is not abstract and does not implement abstract member public abstract fun onNewIntent(p0: Intent): Boolean defined in io.flutter.plugin.common.PluginRegistry.NewIntentListener

    'onNewIntent' overrides nothing, Class 'FlutterFacebookSdkPlugin' is not abstract and does not implement abstract member public abstract fun onNewIntent(p0: Intent): Boolean defined in io.flutter.plugin.common.PluginRegistry.NewIntentListener

    Need update kotlin version 1.3.50 -> 1.6.10 remove ? (Intent?) -> Intent My code handled exception:

        override fun onNewIntent(intent: Intent): Boolean {
            try {
                // some code
                deepLinkUrl = AppLinks.getTargetUrl(intent).toString()
                eventSink!!.success(deepLinkUrl)
            } catch (e: NullPointerException) {
                // handler
                return false
            }
            return false
        }
    
    opened by tvqphong001 3
  • Ran into error Execution failed for task ':flutter_facebook_sdk:compileDebugKotlin'. with Flutter 3

    Ran into error Execution failed for task ':flutter_facebook_sdk:compileDebugKotlin'. with Flutter 3

    I upgraded to Flutter 3.0.1 and Kotlin version 1.6.10 and then started running into this error. Full log below:

    
    e: /Users/justmegawatt/Utils/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_facebook_sdk-1.0.0/android/src/main/kotlin/saad/farhan/flutter_facebook_sdk/FlutterFacebookSdkPlugin.kt: (31, 1): Class 'FlutterFacebookSdkPlugin' is not abstract and does not implement abstract member public abstract fun onNewIntent(p0: Intent): Boolean defined in io.flutter.plugin.common.PluginRegistry.NewIntentListener
    e: /Users/justmegawatt/Utils/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_facebook_sdk-1.0.0/android/src/main/kotlin/saad/farhan/flutter_facebook_sdk/FlutterFacebookSdkPlugin.kt: (258, 5): 'onNewIntent' overrides nothing
    
    FAILURE: Build failed with an exception.
    
    * What went wrong:
    Execution failed for task ':flutter_facebook_sdk:compileDebugKotlin'.
    > Compilation error. See log for more details
    
    
    opened by justmegawatt 11
Owner
Saad Farhan
Saad Farhan
Flutter Plugin for Facebook App Events

facebook_app_events Flutter plugin for Facebook App Events. An app event is an action that takes place in your app or on your web page such as a perso

oddbit 93 Jan 3, 2023
Facebook based-app - A Facebook based app which actually looks like Facebook

Facebook based mobile application This project is a mobile application which act

Munem Sarker 3 Nov 23, 2022
Deep AR SDK for Flutter.

This plugin is the official SDK for DeepAR. Platforms supported: Android & iOS. The current version of plugin supports: Live AR previews ✅ Take screen

DeepAR SDK 11 Dec 14, 2022
Deepak Sharma 149 Dec 10, 2022
An updated version of flutter_kid_starter from - quangrau using the latest Flutter 3.0 SDK

This application is an updated version of flutter_kid_starter from - quangrau using the latest Flutter 3.0 SDK, to update this awesome open-source application.

Md. Siam 29 Oct 12, 2022
Flutter plugin which helps you to find links in String using NSDataDetector and Linkify

Flutter's Native Linkify native_linkify is a Flutter plugin. Use it to find links in plain-text. The plugin uses NSDataDetector for iOS and macOS; Lin

Ilia Beregovskii 3 Nov 29, 2022
Flutter plugin, support android/ios.Support crop, flip, rotate, color martix, mix image, add text. merge multi images.

image_editor The version of readme pub and github may be inconsistent, please refer to github. Use native(objc,kotlin) code to handle image data, it i

FlutterCandies 317 Jan 3, 2023
A simple project demonstrating how to build a face filter app using Flutter and Deep AR

flutter_deepar This is a simple project that will help you learn how to build a simple face filter app with Flutter and Deep AR You can read an articl

Promise Amadi 32 Jan 1, 2023
A flutter plugin to get android version(SDK INT).

get_sdk_int A new flutter plugin project. Getting Started This project is a starting point for a Flutter plug-in package, a specialized package that i

jinyus 0 Dec 28, 2021
Stories like in Instagram, each story can include multiple images and videos. Package supports video, titles, preliminary caching.

flutter_instagram_stories A Flutter package for displaying stories just like Whatsapp & Instagram. Built-in groups (multiple stories with one icon), c

Alex Awaik 125 Dec 9, 2022
GetX Architecture for large scale project, This project include - pagination, pull to refresh, localization, network call and advance error handling

GetX Architecture for large scale project, This project include - pagination, pull to refresh, localization, network call and advance error handling

Wai Han Ko 5 Nov 29, 2022
A simple ratingbar for flutter which also include a rating bar indicator, supporting any fraction of rating.

A simple yet fully customizable rating bar for flutter which also include a rating bar indicator, supporting any fraction of rating. Salient Features

Sarbagya Dhaubanjar 324 Dec 27, 2022
This project include all the assets I used in this tutorial

clothes_app_starter A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you star

Ruize Nie 11 Jun 29, 2022
This repo provides a starter kit thats include Getx package.

Getx_Starter This repo provides a starter kit thats include Getx package. It includes key-value databases, sample pages, and components which they are

Okan 2 Apr 27, 2022
A simple project that will help you learn how to build a simple face filter app with Flutter and Deep AR

flutter_deepar This is a simple project that will help you learn how to build a simple face filter app with Flutter and Deep AR You can read an articl

mobile software engineer and team leader 3 Mar 11, 2022
The ArDrive Web App allows a user to log in to securely view, upload and manage their ArDrive files.

ArDrive Web The ArDrive Web App allows a user to log in to securely view, upload and manage their ArDrive files. Have any questions? Join the ArDrive

ArDrive App 36 Dec 14, 2022
Pneumonia detection android app based on deep learning API

pneumonia A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you started if thi

Mohammed Mahmood 0 Nov 7, 2021
A flutter plugin to show Truecaller like overlay window, over all other apps along with callback events

A flutter plugin to show Truecaller like overlay window, over all other apps along with callback events. Android Go or Android 11 & above, this plugin shows notification bubble, in other android versions, it shows an overlay window.

Venkata Sai Vamsi Penupothu 85 Dec 29, 2022