Search code examples
facebookflutterads

Flutter admob mediation with Facebook Audience Network: how to customize ad display?


I have a flutter social network app with admob native ads working fine, and I would like to implement mediation with Facebook Audience Network. I configured everything on Admob and imported the SDK, the ads impressions are OK.

But this is how Facebook ads are displayed (which is not great, Admob ads fill all the space available):

Facebook Audience Network ads display

This is my build code for ads in feed :

separatorBuilder: (BuildContext context, int index){
            if (index != 0 && index % 3 == 0) {
              return Container(
                height: 300,
                child: Card(
                    color: white,
                    child: NativeAdmob(
                        controller: nativeAdController,
                        adUnitID: AdsHelper.bannerAdUnitId,
                        type: NativeAdmobType.full,
                        error: CupertinoActivityIndicator())
                ),
              );
            } else {
              return Container(height: 5, color: baseAccent);
            }
          },

My question is :

How can I customize the ads layout so that it fills available space and have a great display ?

Also, when I clic on ads nothing happen, maybe it is because this version is not yet released on AppStore and PlayStore ?


Solution

  • For those who might have the same issue, I found an alternative solution.

    The integration problem seems to come from flutter_native_admob package that is not really compatible with mediation with facebook apparently. So I replaced it by facebook_audience_network package and now it works fine.

    I have no more mediation through Admob but at least I have facebook ads which was my point.