7

I am new to ad mediation. I have a flutter app and I have integrated admob using following admob_flutter plugin and its working fine on both Android and iOS.

https://pub.dev/packages/admob_flutter

Now I want to add facebook audience as mediation network. I have followed the steps in following tutorial provided by google to setup audience account and integration in Admob portal.

https://developers.google.com/admob/android/mediation/facebook

My confusion is about facebook audience sdk to integrate. Which one should I add :

  1. facebook_audience flutter plugin -https://pub.dev/packages/facebook_audience_network.

  2. implementation 'com.google.ads.mediation:facebook:5.8.0.0' - google tutorial ask to add open source mediation adapter.

  3. implementation 'com.facebook.android:audience-network-sdk:5.+' - facebook audience tutorial ask to integrate this sdk.

What is the difference betweek sdk and adapter? Should we have both facebook audience sdk and mediation adapter (Point 2 and 3)? If only sdk is enough, then including flutter plugin is enough for both android and iOS?

Thanks

vijay053
  • 822
  • 3
  • 18
  • 36

1 Answers1

3

You don't need to add the facebook_audience dependency. If you simply add implementation 'com.google.ads.mediation:facebook:5.8.0.0' to your build.gradle it will automatically install the adapter in your app. If you put point 2 & 3 both in your build.gradle it will integrate the adapter as well as the SDK. You require the SDK to show ads in your app, similar to your Admob SDK (admob_flutter) and the adapter is used to link it to your Admob Mediation.

Arnav
  • 1,404
  • 2
  • 19
  • 38
  • They've come up with firebase_admob plugin for flutter. So you're saying that if I add that, then in build.gradle add the mediation:facebook:x.x.x. and the audience-network-sd:5" ... mediation should work? But ... how does it work ? Does the flutter plugin interact with the mediation:facebook library and so handles the mediation ?! I'm confused as to which component communicates with which component... – AndreiBogdan May 03 '20 at 19:21
  • 1
    I have my own question here, if you want you can answer there ... https://stackoverflow.com/questions/61579831/flutter-admob-ads-with-mediation – AndreiBogdan May 03 '20 at 19:22
  • i need to integrate both point 2 and 3??? or it's work fine only with point 2? – Muhammad Anus Aug 23 '21 at 18:03