Search docs/
Getting StartedPlugins


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

Requires Cordova plugin: cordova-plugin-facebook4. For more info, please see the Facebook Connect.


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-facebook4 --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'.


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

Take note of the id for the next step:

<widget id="com.mycompany.testapp" version="0.0.1" xmlns="" xmlns:cdv="">

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.


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.

Activation events are automatically tracked for you in the plugin.

Events are listed on the insights page.

For tracking events, see logEvent and logPurchase.



Contact Us Today!


ionic cordova plugin add cordova-plugin-facebook4npm install @ionic-native/facebooknpm install cordova-plugin-facebook4npm install @ionic-native/facebookionic cap sync
Ionic Native Enterprise はIonic Teamが完全にサポートしメンテナンスしているプラグインを利用できます。 詳しくみる か、エンタープライズプラグインに興味があれば 連絡ください


  • Android
  • iOS
  • Browser


Using React?

See here.

import { Facebook, FacebookLoginResponse } from '@ionic-native/facebook/ngx';

constructor(private fb: Facebook) { }


this.fb.login(['public_profile', 'user_friends', 'email'])
  .then((res: FacebookLoginResponse) => console.log('Logged into Facebook!', res))
  .catch(e => console.log('Error logging into Facebook', e));