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.

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. 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 Your Application

You must add the app you’d like to run Rewarded Video, 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 ironSource 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‘.
    ironsource-mediation-fb-add-app
  2. Enter a name for your app and verify that the contact email. Then click ‘Create App ID‘.
    ironsource-fb-new-app-id
  3. You will then be prompted to select a product from the Facebook’s Product page within your account. Hover over Facebook Audience Network and select ‘Set Up‘:
    ironsource-mediation-fb-audience-network
  4. You will then be redirected to the following window, select ‘Get Started‘ and then proceed to ‘Add App‘:
    ironsource-fb-getting-startedironsource-fb-add-app
  5. Enter the URL for your app and click ‘Submit‘.

 

Step 3. Create Ad Space & Placement

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 spaces and placements for your app in your Facebook account, Navigate to ‘Ad Spaces’ on the the left menu under Products  Audience Network.
    Next, click on ‘Create Ad Space’.
    ironsource-fb-ad-spaces
  2. The below window will then open and fill in the following details:
    1. Name: enter a relevant ame for this placement (for example, App Load iOS)
    2. Description:  Provide a brief description of when the user will see ads in this ad space.
      ironsource-fb-ad-space
  3. Next, you will be prompted to create an ad placement in this ad space or simply go to the Ad Spaces page and select ‘Create Placement‘. Make sure to fill out your information as follows:
    1. Status: Enabled
    2. Ad Space: Ensure that you’re creating the placement in the intended ad space
    3. 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-fb-ad-placement-creation
      If you’d like to define a Refresh Interval for Banners, set it here. Leave the toggle for Refresh Rate Handled by Mediation on No and choose a time period from the Refresh dropdown:
      ironsource-fb-banner-placement-creaton
    4. 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 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.
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
    You can find your App ID on the top left of every page in your Facebook account or on your dashboard.
    ironsource-mediation-fb-app-id
  2. Placement ID
    To retrieve your Placement ID, go to Products  Audience Network ➣ Ad Spaces in the left sidebar on your Facebook Audience Network account

    1. Expand the relevant ad space and you’ll find your the placement ID.
      ironsource-facebook-ad-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‘.
      ironsource-fb-token-tool
    2. You will then be directed to a page with a list of all your apps’ and their corresponding App Tokens:
      ironsource-app-token-page

Configure Facebook’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 Adapter to Your Build

iOS

ironSource supports both Cocoapods and Manual download mechanisms.

Cocoapods

To integrate the Facebook Audience Network adapter with Cocoapods, enter the following line in your podfile and you’re good to go!

pod 'IronSourceFacebookAdapter','4.0.2.1'

Manual Download

 

  1. Download the Facebook Adapter:
    Add the Facebook Adapter to your build. You can find the latest Facebook Adapter here.
    Important! The Adapter also contains the Facebook SDK. You DON’T need to add the Facebook SDK directly.
  2. Add the Facebook frameworks to your Project:
    After you download the Adapter, drop the Adapter framework into your Xcode Project, i.e. drop ISFacebookAudienceNetworkAdapter.framework into your Xcode project.
  3. Open Target Build Settings  Architectures and confirm that your Xcode Project uses Base SDK version 6.0 or greater and that it does not use armv6 architecture.

 

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 setAdaptersDebug:YES];

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

 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.

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.