Mediate Facebook

This guide is intended for publishers who want to use the MoPub SDK to load and display ads from Facebook Audience Network via mediation. Below, you will find information about the ad network, integration/setup instructions, and more. For more information about how MoPub mediation works, visit this guide.

Supported Ad Formats

The following ad formats are currently supported by Facebook Audience Network. For the latest support, visit the Facebook Audience Network homepage.

  • Banner
  • Interstitial
  • Rewarded Video
  • Native

Download and Integration

To download the Facebook Audience Network adapters, navigate to the Mediation Integration Tool. You will also need to download the Facebook Audience Network SDK, which can be found below.

For the latest download and integration instructions, ensure that you have consulted Facebook Audience Network’s tutorials before you integrate the SDK and adapters.

iOS Download
Android Download

Note: Facebook uses the device’s localhost (127.0.0.1) to cache ad media files. Since Android 9 blocks cleartext traffic by default, publishers must add the following XML configuration to their app’s Manifest to whitelist unsecure traffic (click here for additional information):

    <domain-config cleartextTrafficPermitted="true">
        <domain includeSubdomains="true">127.0.0.1</domain>
    </domain-config>

Set up Facebook Audience Network on the MoPub dashboard

  • Placement ID is required.

Migrate Facebook Audience Network from Custom Native Setup

  • Transfer Placement ID (if applicable) from the old custom native connection to the supported Facebook Audience Network instance.
  • MoPub will initiate the following Facebook Audience Network custom event class names to render the ads:
    • iOS
      • FacebookBannerCustomEvent
      • FacebookInterstitialCustomEvent
      • FacebookRewardedVideoCustomEvent
      • FacebookNativeCustomEvent
    • Android
      • com.mopub.mobileads.FacebookBanner
      • com.mopub.mobileads.FacebookInterstitial
      • com.mopub.mobileads.FacebookRewardedVideo
      • com.mopub.nativeads.FacebookNative

Note: If you are manually entering the above-mentioned class names, migrate to the new network setup and pause the “custom native network”. If you are using your own custom event class names, you should have both the old custom native network setup & the new Facebook Audience Network network UI setup for backward compatibility.

Note: During migration, please make sure the custom native network and the Facebook Audience Network network are not live at the same time as this may cause revenue-impacting issues.

Test Ad

While testing your SDK integrations and network setups, it is recommended that you leverage test ad placements for a consistent fill rate. To set up test mode, please reference Facebook’s test ad article for instructions.

For details about available error codes as well as potential resolutions, reference Facebook’s documentation.

Additional Support

For inquiries and support, please visit Facebook Audience Network’s support center.

Last updated October 10, 2018

TWITTER, MOPUB, and the Bird logo are trademarks of Twitter, Inc. or its affiliates. All third party logos and trademarks included are the property of their respective owners.

© 2018 MoPub Inc.