Show Sidebar

Facebook Audience Network Integration using Android SDK

Supported Facebook Audience Network Version: 4.25
Supported Ad Formats: The VMAX SDK supports native ads (in-feed and content stream), banners, interstitials and in-stream video ads from Facebook’s Audience Network.


  1. When using Facebook as the mediation partner, ensure that users have the Facebook Native App installed on their devices and they are logged in to this app.
  2. As per the Facebook Developer Payments Terms, if you reach the redemption threshold (currently $100) and have not entered your payout details, Facebook’s Audience Network will stop serving ads.

You will need

  1. an active Facebook account
  2. Placement ID
  3. App ID
  4. Secret Key

In your Facebook Account

On the Developer Dashboard page, Placement ID, the App ID and Secret Key are shown below the App Name.

Further Integration

Step 1: Create a package in your app and add the files,, and from the SDK folder Mediation Files\Mediation Adapters\com\vmax\android\ads\mediation\partners to it.
Note: In case you have selected Dynamic Banner/Dynamic Billboard as an ad format in the VMAX Dashboard make sure that you include adapter files for both Banner/Billboard and Native

Step 2:
a) For Android Studio add AudienceNetwork.aar from the SDK folder Mediation Files\Mediation Libraries as a Module Dependency in your app If you are adding AudienceNetwork.aar file as a dependency you can skip step no. 3

b) For Eclipse add the AudienceNetwork folder from Eclipse\Mediation Libraries to your Eclipse Project, if you are adding the AudienceNetwork folder as a dependency step no.3 is mandatory

For both Android Studio and Eclipse add android support v4 library from the SDK folder Mediation Files\Mediation Libraries  in your app

To support Native Facebook ads add recyclerview library in your app.
Step 3: Add the accompanying code inside the <application> tag in AndroidManifest.xml

Step 4: [Optional] If you are running ProGuard on your Android application, ensure that the following directive is added in your ProGuard configuration file

What would you like to do next?