Facebook Audience Network Mediation Integration Guide

This guide will instruct you step-by-step on how to set Facebook Audience Network live as an Ad Network on the ironSource Mediation platform. The integration process is completed in a few simple steps:

  1. Create a Facebook Audience Network Account
    1. First Time Setup
    2. Registered Users
  2. Add Application in Facebook Audience Network
  3. Create Ad Placement in Facebook Audience Network
  4. Activate Facebook Audience Network in your ironSource Network Setup Module
  5. Add the Facebook Audience Network Adapter to your build

 

Before You Start
Make sure you have correctly integrated ironSource’s InterstitialRewarded Video or Banner Mediation in your application.

Step 1. Create a Facebook Audience Network Account

  1. First Time Setup
    1. Go to Facebook for Developers and register with your Facebook account.
    2. Accept the Facebook Platform & Privacy Policy.
    3. Click ‘Register‘.
      Supersonic FB developer signup
  2. Registered Users
    1. Sign into your Facebook account.
    2. On the left sidebar you will see a section called Developer. Click on ‘Manage Apps’.

Step 2. Add Application in Facebook Audience Network

You must add the app you’d like to run Interstitial or Banner Mediation on to your Facebook Audience Network account. If the app has already been added to your account, you may skip to Step 3.

All newly created apps in your Facebook account will by default be in TestMode. Once the Facebook team has reviewed the placement, you will be able to activate live ads. To enable test ads while in test mode, you will have to add a code snippet to your client before loading an ad. Follow this article on Facebook to request test ads.
  1. Add the app you’d like to run Interstitial or Banner Mediation on to your account. As a new user, you will be redirected to the below screen. As a registered user, simply hover over My Apps in the upper-right corner and click on ‘Add a New App‘.
    Supersonic FB Add App
  2. Select iOS or Android.
  3. Fill in your app’s name (even if it is not currently live in an app store).
  4. Click on “Create New Facebook App ID“.
  5. Choose the category most relevant to your app.
    Supersonic FB Category
  6. Click on “Create App ID“.

Step 3. Create Ad Placement in Facebook Audience Network

Important! You must create a dedicated placement per platform (iOS and Android) in order for Facebook Audience Network to work correctly with ironSource‘s Mediation platform.
  1. To create ad placements for your app in your Facebook account, go to the main dashboard and on the left sidebar under Products ➣ Audience Network, click on ‘Placements‘.
    Next, click on ‘Create Ad Placement’.
    ironSource FBA Create Ad Placement per OS
  2. The below window will then open and you must fill in the following details:
    1. Status: Enabled
    2. Name: Choose a Name for this placement (for example, App Load iOS)
    3. Steps to Trigger Ad: You can omit this part as this will be handled through your ironSource Dashboard.
    4. Display Format: Rewarded Video or Interstitial (App Only) or Banner
       Note: If you don’t see Rewarded Video as an option in the Display Format dropdown, contact your account manager at Facebook Audience Network to enable Rewarded Video as an ad format.

      ironsource-display-format-rvbannerisIf you’d like to define a Refresh Interval for Banners, you must set here. Leave the toggle for Refresh Rate Handled by Mediation on No and choose a time period from the Refresh dropdown:
      ironsource-fb-banner-refresh-rate-settings
  3. Click ‘Save‘.
Note: It is mandatory to create two separate placements for iOS and Android. We recommend creating one placement per ad location per application.

Step 4. Activate Facebook Audience Network in Your ironSource Network Setup Module

There are 3 pieces of Data from the Facebook Audience Network account which need to be inserted into your ironSource Network Setup Module in order for Facebook Audience Network to work correctly in connection with ironSource:

App ID This is the unique identifier of your app in Facebook Audience Network’s system.
Placement ID  This is the unique identifier of a specific placement in your app in Facebook Audience Network’s system.
App Token The unique identifier of a call for a specific application. App Tokens are used to make requests to Facebook APIs on behalf of an app rather than a user. This can be used to modify the parameters of your app, create and manage test users, or read your apps’ insights.

Once you obtain this information, you must configure Facebook Audience Network’s Parameters in your ironSource Account. By adding the above information correctly, you will be able to take full advantage of Facebook’s Interstitial or Banner ad inventory and reporting data on ironSource’s Mediation platform.

  1. App ID
    To retrieve your App ID, hover over My Apps in the upper-right corner and click on the specific app of which you want to see the App ID. This will take you to your Facebook Audience Network Dashboard. Here you will see the specific App ID:
    Supersonic FB App ID
  2. Placement ID
    To retrieve your Placement ID, click on ‘Audience Network’ in the left sidebar on your Facebook Audience Network Dashboard.

    1. Navigate to the Placement section.
    2. Scroll down to the Active Placements section to see your Placement ID for the dedicated placement you created earlier at the bottom of the page.
      facebook-audience-ironsource-mediation-placement-id
  3. App Token
    To retrieve your App Token, go to Tools & Support on the top menu.

    1. On the left sidebar, under Tools, click on ‘Access Token Tool‘.
      FB Supersonic IS Mediation App Token
    2. You will then be directed to the page with your App Token:
      FB Supersonic IS Mediation App Token Retrieval

Configure Facebook Audience Network’s Parameters into ironSource Account

  • Once you have all these parameters, log in to your ironSource account and go to ‘Monetize‘ ➣ ‘Mediation‘ ➣ ‘SDK Networks‘. Select Facebook from the list of Available Ad Networks and click on ‘Activate’.
    ironsource-fb-network-setup-1
    Note: To run Interstitial, Rewarded Video or Banner Mediation with Facebook, you must have an active Facebook Audience Network Account. When you select Facebook as a network, you will see the below pop-up. If you have an active Facebook account, simply click activate and Save. If you do not have an active Facebook account, you must register at Facebook Audience Network and follow this documentation from Step 1.
    ironsource-platform-activate-fb
  • Select the app on which you’d like to run ironSource‘s Interstitial, Rewarded Video or Banner Mediation with Facebook.
    ironsource-fb-network-setup-2
  • Select Facebook Audience Network from the Setup list of Ad Networks, click on the Define icon and insert the App ID, Placement ID and App Token in the relevant fields.
    ironsource-fb-network-setup-define
  • Then set the Status toggle to Active and click ‘Save’.
    ironsource-facebook-mediation-activate
  • You will then see Facebook as Active for Interstitial, Rewarded Video or Banner Mediation on your Mediation Dashboard.
  • New! Verify your integration with the Reporting API; this column will check your integration through the Reporting API and return three possible responses: Verified, Failed and No Response. Double check your integration and the information you entered above; then click ‘Retry‘ until you see ‘Verified’.

Step 5. Add the Facebook Audience Network Adapter to Your Build

Unity Plugin (Android Integration):
Make sure you have the support-v4.jar integrated in your project in your Assets/Plugins/Android directory.

  1. Download the Facebook Unity Package:
    Import the IronSourceFacebookAdapter_[version].unitypackage to your Unity project. You can find the latest Facebook Unity Package here.
  2. Add the Facebook files to your Unity project:
    1. To add the adapter, simply double click on the IronSourceFacebookAdapter_[version].unitypackage and add all files to your Unity project.
      Note: If you are upgrading from a previous version, please remove Facebook.x.x.x.jar from Assets/Plugins/Android.

 

Unity Plugin (iOS Integration):

  1. Download the Facebook Unity Package:
    Import the IronSourceFacebookAdapter_[version].unitypackage to your Unity project. You can find the latest Facebook Unity Package here.
  2. Add the Facebook files to your Unity project:
    To add the adapter, simply double click on the IronSourceFacebookAdapter_[version].unitypackage and add all files to your Unity project.
    Note: If you are upgrading from a previous version, please remove Facebook.x.x.x.framework from Assets/Plugins/iOS.
    Our Unity Plugin adds the necessary frameworks automatically to your Xcode project.

 

Verify Your Ad Network Integration

  • Verify your ad network integration with our Integration Helper. The ironSource SDK provides a tool to ensure you’ve successfully integrated our SDK as well as any additional network adapters.
  • Manage the debug logs for your integrated mediation ad networks with this boolean

    IronSource.Agent.setAdaptersDebug(true);

    When set to TRUE, this line of code will enable debug logs to help you troubleshoot issues with all of the mediation ad networks that permit to do so.  Remove this code before your app goes live with our ad units! Supported for SDK versions 6.5.2 and up.

Done!
You are now all set to deliver Facebook Audience Network Ads through the ironSource Mediation platform!


What’s Next?
To leverage additional ad networks through ironSource Mediation, integrate the adapters and follow our integration guides.