⭕ Facebook Audience Network is now only using bidding to fill ads, this means you need to connect the your Facebook ad units with mediation network like AdMob or AppLovin and run it under them. Read more info
An Android app that displays all the Facebook Mobile Ads based on Audience Network SDK. Replace the existing adunits from ActivityConfig.java class. Facebook offer some extra tips on how to implement the ads for Android on this page.
Add the audience network sdk dependency to build.gradle(Module: app)
implementation 'com.facebook.android:audience-network-sdk:6.2.0'
Initialize the AudienceNetworkAds class.
AudienceNetworkAds.initialize(this);
The ads may not be displaCancel changesying on Android Emulators so try to run the app on a real Android Phone or Tablet:
- Banner Ad (50 & 90 Sized)- Interstitial Ad
- Rectangle Banner Ad
- Reward Ad (Require approval to request ad)
- Native Ad (Rectangle)
- Native Ad (List Stype)
Now grab a cup of hot or cold coffee☕ and let's get started. Feel free to give a star, fork and play around the ads.
This app make it easy for you to implement Facebook ads very easily into your Android App and it is very similar to how we used to implement the Google AdMob Ads.