📘
Awesome Cordova Plugins
  • Plugins
  • ABBYY Real-Time Recognition
  • Action Sheet
  • AdjustAppStoreSubscription
  • RewardVideo
  • AdMob Pro
  • AdMob
  • AES256
  • AllInOneSDK
  • Analytics Firebase
  • Android ExoPlayer
  • Android Full Screen
  • Android Notch
  • Android Permissions
  • Anyline
  • App Availability
  • App Center Analytics
  • App Center Crashes
  • App Center Low Memory
  • App Center Push
  • App Center Shared
  • App Preferences
  • App Rate
  • App Version
  • Apple Wallet
  • HTTP
  • Appsflyer
  • Background Fetch
  • Background Geolocation
  • Background Mode
  • FileTransferManager
  • Badge
  • Barcode Scanner
  • Battery Status
  • BioCatch
  • BiometricWrapper
  • BLE
  • BlinkId
  • Bluetooth Classic Serial Port
  • BluetoothLE
  • Bluetooth Serial
  • BranchIo
  • Broadcaster
  • Browser Tab
  • Build Info
  • Calendar
  • Call Directory
  • Call Number
  • Camera Preview
  • Camera
  • Checkout
  • Chooser
  • CleverTap
  • Clipboard
  • Cloud Settings
  • Code Push
  • CustomUISDK
  • Deeplinks
  • Device Accounts
  • Device Motion
  • Device Orientation
  • Device
  • Dfu Update
  • Diagnostic
  • Dialogs
  • DNS
  • iOS DocumentPicker
  • Document Scanner
  • Document Viewer
  • Dynamsoft Barcode Scanner
  • Email Composer
  • Answers
  • Facebook
  • FCM
  • File Opener
  • File Path
  • File Transfer
  • File
  • Fingerprint AIO
  • Firebase Analytics
  • Firebase Authentication
  • Firebase Config
  • FirebaseCrash
  • Firebase Crashlytics
  • Firebase Dynamic Links
  • Firebase Messaging
  • Firebase Vision
  • Firebase X
  • Firebase
  • Flashlight
  • Foreground Service
  • FTP
  • Gao De Location
  • GCDWebServer
  • Ge Tui Sdk Plugin
  • Geolocation
  • Globalization
  • Google Analytics
  • Google Nearby
  • Google Plus
  • Header Color
  • Health Kit
  • Health
  • HTTP
  • Coordinates
  • Iamport Cordova
  • IBeacon
  • Image Picker
  • Imap
  • In App Browser
  • In App Purchase 2
  • In App Review
  • In App Update
  • Insomnia
  • Instagram
  • Intercom
  • Ionic Webview
  • ios-aswebauthenticationsession-api
  • Is Debug
  • Keyboard
  • Keychain
  • Kommunicate
  • Launch Navigator
  • Launch Review
  • Line Login
  • LocalBackup
  • Local Notifications
  • Location Accuracy
  • Lottie Splash Screen
  • Media Capture
  • Media
  • Metrix
  • Mixpanel
  • MLKitTranslate
  • Mobile Messaging
  • Multiple Documents Picker
  • Music Controls
  • Native Audio
  • Native Geocoder
  • Native Keyboard
  • Native Page Transitions
  • Native Storage
  • NativeView
  • Network Interface
  • Network
  • UriHelper
  • OCR
  • OneSignal
  • Open Native Settings
  • OpenALPR
  • PayTabs
  • PDFGenerator
  • Photo Library
  • Photo Viewer
  • PlayInstallReferrer
  • Pollfish
  • Power Management
  • Power Optimization
  • PreviewAnyFile
  • Printer
  • PSPDFKit-Cordova
  • Purchases
  • Push
  • PushapePush
  • Safari View Controller
  • Save Dialog
  • Screen Orientation
  • Secure Storage Echo
  • Secure Storage
  • ServiceDiscovery
  • Shake
  • Sign In With Apple
  • SmartlookSetupConfigBuilder
  • Sms Retriever
  • SMS
  • Smtp Client
  • Social Sharing
  • Speech Recognition
  • Spinner Dialog
  • Splash Screen
  • Spotify Auth
  • Sqlite Db Copy
  • SQLite Porter
  • SQLite
  • StarPRNT
  • Status Bar
  • Streaming Media
  • Stripe
  • SumUp
  • System Alert Window Permission
  • Taptic Engine
  • TealiumAdIdentifier
  • TealiumInstallReferrer
  • Tealium
  • Text To Speech Advanced
  • Theme Detection
  • 3D Touch
  • Toast
  • Touch ID
  • DbResult
  • Uptime
  • UrbanAirShip
  • Usabilla
  • Vibes
  • Vibration
  • Video Editor
  • Video Player
  • Web Intent
  • Web Server
  • WebSocket Server
  • Webengage
  • Wechat
  • WheelSelector Plugin
  • WifiWizard2
  • Push Notifications - WonderPush
  • Youtube Video Player
  • ZBar
  • Zeroconf
  • Zoom
  • ABBYY Real-Time Recognition
  • Action Sheet
  • AdjustThirdPartySharing
  • RewardVideo
  • AdMob Pro
  • AdMob
  • AdvancedImagePicker
  • AES256
  • AllInOneSDK
  • Analytics Firebase
  • Android ExoPlayer
  • Android Full Screen
  • Android Notch
  • Android Permissions
  • Anyline
  • App Availability
  • App Center Analytics
  • App Center Crashes
  • App Center Low Memory
  • App Center Push
  • App Center Shared
  • App Preferences
  • App Rate
  • App Review
  • App Version
  • Apple Wallet
  • Applovin
  • HTTP
  • Appsflyer
  • Background Fetch
  • Background Geolocation
  • Background Mode
  • BackgroundUpload
  • Badge
  • Barcode Scanner
  • Battery Status
  • BioCatch
  • BiometricWrapper
  • BLE
  • BlinkId
  • Bluetooth Classic Serial Port
  • BluetoothLE
  • Bluetooth Serial
  • BranchIo
  • Brightness
  • Broadcaster
  • Browser Tab
  • Build Info
  • Calendar
  • Call Directory
  • Call Number
  • Camera Preview
  • Camera
  • CFPaymentComponentBuilder
  • Checkout
  • Chooser
  • Chooser
  • CleverTap
  • Clipboard
  • Cloud Settings
  • Code Push
  • Crop Plugin Privacy
  • CustomUISDK
  • Deeplinks
  • Device Accounts
  • Device Motion
  • Device Orientation
  • Device
  • Dfu Update
  • Diagnostic
  • Dialogs
  • DNS
  • iOS DocumentPicker
  • Document Scanner
  • Document Viewer
  • dynamsoft-barcode-scanner
  • Email Composer
  • Crashlytics
  • Facebook
  • FbSdk
  • FCM
  • FFMpeg
  • FileChooser Plugin
  • File MD5
  • File Opener
  • File Path
  • File Transfer
  • File
  • Fingerprint AIO
  • Firebase Analytics
  • Firebase Authentication
  • Firebase Config
  • FirebaseCrash
  • Firebase Crashlytics
  • Firebase Dynamic Links
  • Firebase Messaging
  • FirebaseModelInput
  • Firebase Vision
  • Firebase X
  • Firebase
  • Flashlight
  • Foreground Service
  • FTP
  • Gao De Location
  • gcdwebserver
  • Ge Tui Sdk Plugin
  • Geolocation
  • Globalization
  • Google Analytics
  • Google Nearby
  • Google Plus
  • Header Color
  • Health Kit
  • Health
  • HTTP
  • Coordinates
  • IRoot
  • Iamport Cordova
  • IBeacon
  • Image Picker
  • ImageResizer
  • Imap
  • In App Browser
  • In App Purchase 2
  • In App Review
  • In App Update
  • Insomnia
  • Instagram
  • Intercom
  • Ionic Webview
  • ios-aswebauthenticationsession-api
  • Is Debug
  • Keyboard
  • Keychain
  • Kommunicate
  • Launch Navigator
  • Launch Review
  • Lets Cooee
  • Line Login
  • LocalBackup
  • Local Notifications
  • Location Accuracy
  • Lottie Splash Screen
  • Device eMagnetometer
  • Market
  • Media Capture
  • Media
  • Metrix
  • Mixpanel
  • MLKitTranslate
  • Mobile Accessibility
  • Mobile Messaging
  • Multiple Documents Picker
  • Music Controls
  • Native Audio
  • Native Geocoder
  • Native Keyboard
  • Native Page Transitions
  • Native Storage
  • NativeView
  • Network Interface
  • Network
  • newrelic mobile
  • NFC
  • OCR
  • OneSignal
  • Open Native Settings
  • OpenALPR
  • PayTabs
  • PDFGenerator
  • Photo Library
  • Photo Viewer
  • PlayInstallReferrer
  • Pollfish
  • Power Management
    • Power Management
  • Power Optimization
  • PreviewAnyFile
  • Printer
  • PSPDFKit-Cordova
  • Purchases
  • Push
  • PushapePush
  • Safari View Controller
  • Save Dialog
  • Screen Orientation
  • Secure Storage Echo
  • Secure Storage
  • ServiceDiscovery
  • Shake
  • ASAuthorizationAppleIDRequest
  • Smartlook
  • SmsRetrieverApi
  • Sms Retriever
  • SMS
  • Smtp Client
  • Social Sharing
  • Speech Recognition
  • Spinner Dialog
  • Splash Screen
  • Spotify Auth
  • Sqlite Db Copy
  • SQLite Porter
  • SQLite
  • SSLCertificateChecker
    • SSLCertificateChecker
  • StarPRNT
  • Status Bar
  • Streaming Media
  • Stripe
  • SumUp
  • System Alert Window Permission
  • Taptic Engine
  • TealiumAdIdentifier
  • TealiumInstallReferrer
  • ConsentExpiry
  • Text To Speech Advanced
  • Theme Detection
  • 3D Touch
  • Toast
  • Touch ID
  • Unique Device ID
  • SyncResult
  • Uptime
  • UrbanAirShip
  • Usabilla
  • Vibes
  • Vibration
  • Video Editor
  • Video Player
  • Web Intent
  • Web Server
  • WebSocket Server
  • Webengage
  • Webim
  • Wechat
  • WheelSelector Plugin
  • WifiWizard2
  • UserPreferencesMethods
  • Youtube Video Player
  • ZBar
  • Zeroconf
  • Zip
  • Zoom
Powered by GitBook
On this page
  • Usage Documentation
  • Events
  • Supported platforms

Was this helpful?

Facebook

PreviousCrashlyticsNextFbSdk

Last updated 1 year ago

Was this helpful?

$ ionic cordova plugin add cordova-plugin-facebook-connect --variable APP_ID="123456789" --variable APP_NAME="myApplication"
$ npm install @awesome-cordova-plugins/facebook

Plugin Repo:

Use the Facebook Connect plugin to obtain access to the native FB application on iOS and Android.

Requires Cordova plugin: cordova-plugin-facebook-connect. For more info, please see the .

Installation

To use the FB plugin, you first have to create a new Facebook App inside of the Facebook developer portal at .

Retrieve the App ID and App Name.

Then type in the following command in your Terminal, where APP_ID and APP_NAME are the values from the Facebook Developer portal.

 ionic cordova plugin add cordova-plugin-facebook-connect --variable APP_ID="123456789" --variable APP_NAME="myApplication"

After, you'll need to add the native platforms you'll be using to your app in the Facebook Developer portal under your app's Settings:

Click 'Add Platform'.

Take note of the id for the next step:

<widget id="com.mycompany.testapp" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">

You can also edit the id to whatever you'd like it to be.

iOS Install

Under 'Bundle ID', add the id from your config.xml file:

Android Install

Under 'Google Play Package Name', add the id from your config.xml file:

And that's it! You can now make calls to Facebook using the plugin.

Events

App events allow you to understand the makeup of users engaging with your app, measure the performance of your Facebook mobile app ads, and reach specific sets of your users with Facebook mobile app ads.

  • [JS] Does not have an Events API, so the plugin functions are empty and will return an automatic success

Activation events are automatically tracked for you in the plugin.

For tracking events, see logEvent and logPurchase.

Supported platforms

  • Android

    • iOS

    • Browser

At this point you'll need to open your project's file, found in the root directory of your project.

[iOS]

[Android]

Events are listed on the .

config.xml
https://developers.facebook.com/docs/ios/app-events
https://developers.facebook.com/docs/android/app-events
insights page
Usage Documentation
https://github.com/cordova-plugin-facebook-connect/cordova-plugin-facebook-connect
Facebook Connect
https://developers.facebook.com/apps
fb-getstarted-2
fb-getstarted-4
fb-getstarted-5
fb-getstarted-6
fb-getstarted-1
fb-getstarted-3