$ ionic cordova plugin add cordova-plugin-fbsdk --variable APP_ID="123456789" --variable APP_NAME="myApplication" --variable CLIENT_TOKEN="abcd1234"
$ npm install @awesome-cordova-plugins/fbsdk
Use the Facebook SDK plugin to obtain access to the native FB application on iOS and Android.
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-fbsdk --variable APP_ID="123456789" --variable APP_NAME="myApplication" --variable CLIENT_TOKEN="abcd1234"
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:
Take note of the
idfor 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
idto whatever you'd like it to be.
Under 'Bundle ID', add the
Under 'Google Play Package Name', add the
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.
- [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