Facebook Audience Network Mediation Integration Guide

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

Step 1. Create a Facebook Account

  1. First Time Setup
    1. Go to Facebook for Developers and register with your Facebook account.
    2. Follow the procedure and set your application name.
    3. Click ‘Register‘.


  1. Registered Users
    1. Sign into your Facebook account.
    2. On the right sidebar you will see ‘My Apps’. Click on Your app.



Step 2. 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, Navigate to the main Dashboard and on the center grid under Add a Product  Audience Network, click on ‘Setup‘.
    Note! unless you did it already, you will be asked to open business account (by facebook), it is rather simple and quick procedure. Complete it and move on.
  2. Choose a platform:
  3. Next, choose the first ad unit you would like to implement in your application:
  4. Click on ‘Next’ and now the ad unit you choose is good to go.
  5. Now you can either create more placements for this platform or add another platform. the next step is setting up Facebook Audience Network inside ironSource platform.
    Note: It is mandatory to create two separate placements for iOS and Android. We recommend creating one placement per ad location per application.

    Step 3. Activate Facebook on the ironSource SDK Network 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.
    User Token The user token is the most commonly used type of token. This kind of access token is needed any time the app calls an API to read, modify or write a specific person’s Facebook data on their behalf. 

    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
      1. To retrieve your app ID, hover over ‘≡’ in the upper-left corner, and click on ‘App Dashboard’:
      2. Choose the application of which you want to see the App ID. this will navigate you to your Facebook Audience Network dashboard. there you should see the specific App ID located on the center of the upper bar
    2. User Token
      1. While still inside your dashboard, To retrieve your User Token, go to Tools -> Graph API Explorer on the top menu.
      2. On the upper-right corner of the Graph API Explorer you should click on the drop-down list (at first it should point on ‘Graph API Explorer’) and choose your application
      3.  Now you should click on the ‘Get Code’ drop-down list (right under the ‘Graph API Explorer’ list from the previous point) and choose ‘Get User Access Token’
      4. Check ‘read_insights‘ and ‘read_audience_network_insights‘ and press on the ‘Get Access Token’ button
      5. At this stage Facebook will generate the new token. Copy the new Access Token and continue.

    3. Placement ID
      1. To retrieve your Placement ID, click on ‘Audience Network’ on the left sidebar in the dashboard
      2. you should be asked to navigate to ‘Monetization Manager’, click on the link:
      3. Under your application review you find a list of your placements, click on the one you want to retrieve it’s PlacementID
      4. Now click over the ‘Get Code’ and there you will find your ID

    Configure Facebook’s Parameters into ironSource Account

    • Once you have all these parameters, log in to your ironSource account and go to ‘Monetize‘ ➣ ‘Setup‘ ➣ ‘SDK Networks‘.
    • Select Facebook from the list of Available Ad Networks and click on ‘Activate’.
      Note: To run 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.
    • Select the app on which you’d like to run ironSource‘s Interstitial, Rewarded Video or Banner Mediation with Facebook.
    • Select Facebook Audience Network from the Setup list of Ad Networks, click on the Define icon and insert the App ID, Placement ID and User Access Token in the relevant fields.
    • Then set status to Active and click ‘Save’. You will then see Facebook as Active for Interstitial Mediation on your Mediation Dashboard.
    • 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 4. Add the Facebook Adapter to Your Build

    Adobe Air Plugin

    1. Download the Facebook ANE
      Add the Facebook Adobe Native Extension to your build. You can find the latest Facebook ANE here.
    2. Add the Facebook ANE to Your Project
      1. To add the ANE, simply add it to your project by clicking on project properties ➣ Flex build path ➣ Native Extension Tab. Click on add ANE and choose file you have downloaded in the previous step.
      2. Make sure you mark the ANE to be packaged into your application on Flex Build Packaging  Native Extension Tab, select the checkbox of ‘package‘.
      3. For Android Users Only
        Update AndroidManifest.xml

        Manifest Activities
        Add the following activities inside the <application> tag in your manifest:

        <!-- Facebook -->
                android:configChanges="keyboardHidden|orientation|screenSize" />
                android:configChanges="keyboardHidden|orientation|screenSize" />

    Verify Your Ad Network Integration
    The ironSource SDK provides an easy way to verify that your mediation integration was completed successfully. To verify your ironSource and additional Ad Networks integration, follow this document.

     Note: if you are using Facebook Audience Network’s server-to-server callbacks and are leveraging the DynamicUserID parameter to verify AdRewarded events, you will see this parameter reflected in their server-side callbacks. In addition, you can also see this parameter in the ironSource server-to-server callbacks.

    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.