Facebook SDK for App Ads

Create AdVerify Your App Ads Setup

Add the Facebook SDK for iOS, Android or JavaScript to your app to:

  • Measure installs
  • Measure app events
  • Add deep linking to your ads
  • Bring people back to your app
  • Improve targeting
  • Encourage purchases
  • Create re-engagement ads
  • Measure in-app conversions

To learn more about these topics read our guides for measuring, targeting and customizing ad formats.

For information about using the Windows SDK for Facebook developed by Microsoft, see Windows SDK for Facebook.

Step-by-Step: Facebook SDK Setup

1. Facebook App ID

You need a Facebook App ID to use the Facebook SDK for iOS, Android or JavaScript (Web). You can use an existing app if you already have one. Otherwise use our Quick Start to create a new app. If you need help follow our how-to Register and Configure an App.

Quick Start: Add a New App

To measure installs in the Facebook Ads Manager you have to associate advertising accounts with your app using the app dashboard.

  1. Go to the app dashboard
  2. Choose your app.
  3. Navigate to "Settings > Advanced" and add accounts via the Authorized Ad Account IDs input field.
App Dashboard

3. Add the Facebook SDK to your app

Follow the instructions of our "Getting started" guides to add the Facebook SDK to your app. The Facebook App ID that you created in step 1 is used for all platforms.


For iOS / Android: You do not need to add any functionality like Sharing or Login with Facebook.

4. More Tracking Methods

If you want to track other app events like a person making a purchase, visit our App Events guide.

Example: Log Purchase

[FBSDKAppEvents logPurchase:4.32 currency:@"USD"];
var params = {}; // optional parameters like `CONTENT_ID`
FB.AppEvents.logPurchase(4.32, "USD", params);
logger.logPurchase(BigDecimal.valueOf(4.32), Currency.getInstance("USD"));

Example: Custom Event

[FBSDKAppEvents logEvent:@"myCustomEventName"];

App Events Guide

Verify Setup (for iOS/Android)

Once you completed the step-by-step guide and use your app tracking will start. You can verify that app events and the Facebook SDK are working properly via the App Ads Helper:

Verify Setup

Keep in Mind

  • App ID: The app ID used in your app must match the app ID used in your ad.
  • Advertising Accounts: If you want other people or companies to run ads on behalf of your app, you can associate advertising accounts with your app via the App Dashboard: From the settings tab, choose Advanced > Advertising Accounts.