Show Sidebar

Facebook Audience Network Integration using Android SDK

Supported Facebook Audience Network Version: 4.16.1
Supported Ad Formats: The VMAX SDK supports native ads (in-feed and content stream), banners, and interstitials 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 com.vmax.android.ads.mediation.partners in your app and add the files FaceBookBanner.java, FaceBookInterstitial.java, and FaceBookNative.java from the SDK folder Mediation Files\Mediation Adapters\com\vmax\android\ads\mediation\partners to it.

Step 2: Add the files android-support-v4.jar and AudienceNetwork.aar from the SDK folder Mediation Files\Mediation Libraries to your app’s libs folder.

To support Native Facebook ads it requires below library

Step 3: Add the accompanying code inside the <application> tag in AndroidManifest.xml
Step 4: Add the following permissions to AndroidManifest.xml
Step 5: [Optional] If you are running ProGuard on your Android application, ensure that the following directive is added in your ProGuard configuration file proguard-rules.pro:

What would you like to do next?