Show Sidebar

Facebook Integration using Android SDK

Rất tiếc, mục này chỉ tồn tại ở English. For the sake of viewer convenience, the content is shown below in the alternative language. You may click the link to switch the active language.

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.

Note:

  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: For Android Studio add AudienceNetwork.aar from the SDK folder Mediation Files\Mediation Libraries as a Module Dependency in your app

and for Eclipse add the AudienceNetwork folder from Eclipse\Mediation Libraries to your Eclipse Project.

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 proguard-rules.pro:

What would you like to do next?