iOS: Native Ads Facebook Audience Network Mediation Issues

299 views
Skip to first unread message

Ben Callis

unread,
Sep 9, 2019, 6:09:30 AM9/9/19
to Google Mobile Ads SDK Developers
I am looking to move to AdMob for my native ads and mediate with Facebook Audience Network.

I have implemented the code and ads are fetched as expected from Admob and Facebook Audience network. However I have come across two issues:

Issue 1: Facebook Audience Network ads always have 0 aspect ratio

ad.mediaContent.aspectRatio gives a valid result for Admob Ads but always returns 0 for Facebook Audience Network ads even when they have a media that can be displayed. This seems like a bug and I was wondering if there was a workaround? I require the imageSize so I can correctly work out the native ad height.

Issue 2: Facebook Audience Network ads have large grey adChoice icon

The adChoice icon for Admob ads is fairly small and well designed. When Facebook Ads are loaded the adChoice icon is very different much larger and less professional looking. What is the reason for this? It is not the same as using Facebook Audience Network ads directly with their SDK and it is not the same as Admob ads.

Example of Facebook Ad mediated from Admob. Notice the 2 AdChoices icons which are large, grey and have no margins.

IMG_8396.jpeg




Example of Admob Ad mediated from Admob.

IMG_8400.jpeg






Example of Facebook Ad served directly from Facebook Audiance network iOS SDK (without using Admob).


IMG_8401.jpeg


What is the reason for not having a constantly sized and well designed icon for all native ads served irrespective of mediation partner? Is there a way I can manually style it or force them to be the same? 




Facebook SDK Version: 5.4.0
Admob SDK Version: 7.49.0
Facebook Admob Adapter Version: 5.5.0.0

Occurring on iOS 10, 11 & 12

Mobile Ads SDK Forum Advisor Prod

unread,
Sep 9, 2019, 2:23:05 PM9/9/19
to benc...@gmail.com, google-adm...@googlegroups.com
Hello Ben, 

Thank you for the detailed explanation. Please find my response below:


Issue 1: Facebook Audience Network ads always have 0 aspect ratio
The issue where the Facebook Audience Network ads have zero aspect ratio is not reproducible on our end. I have integrated the FAN network and tested this with our NativeAdvanced code sample. Could you please share the sample project where the issue is reproducible to check this further? You can share the details privately via Reply privately to author option.


Issue 2: Facebook Audience Network ads have large grey adChoice icon
The size of the adChoice icon from the Facebook ads is determined by the Facebook SDK and the Facebook adapter does not make any changes to the size of the adChoice icon. Since the ads are served from the Facebook network, it would be best that you reach out to that team as they are better equipped to address concerns specific to adChoice icon size. I'm afraid, it is not possible to customize the size of this icon for the mediation network. 

Please let me know if you have any other concerns. 

Thanks,
Bharani Cherukuri
Mobile Ads SDK Team
 

ref:_00D1U1174p._5001UHG7nG:ref

Ben Callis

unread,
Sep 9, 2019, 5:36:22 PM9/9/19
to google-adm...@googlegroups.com
Thanks for the reply.

Issue 1: Facebook Audience Network ads always have 0 aspect ratio

I can look to make a sample project this weekend but in the meantime 

Here is my init code: 

        GADNativeAdViewAdOptions *adViewOptions = [[GADNativeAdViewAdOptions alloc] init];

       adViewOptions.preferredAdChoicesPosition = GADAdChoicesPositionTopLeftCorner;


      self.adLoader = [[GADAdLoader alloc]

                        initWithAdUnitID:@"xxx"

                        rootViewController: topViewController

                        adTypes:@[kGADAdLoaderAdTypeUnifiedNative]

                        options:@[adViewOptions]];

       self.adLoader.delegate = self;


Load code:

    [self.adLoader loadRequest:[GADRequest request]];


Code to check height after a successful load

    CGFloat aspectRatio = ad.mediaContent.aspectRatio;



Aspect ratio is always correct for Admob Ads but always 0 for Facebook ads. 

When debugging it is possible to dig deep into the GADUnifiedNativeAd and see the FBNativeAd and its image size.

(lldb) po ad

<GADUnifiedNativeAd: 0x282a68360>


(lldb) po ad.adNetworkClassName

GADMAdapterFacebook


(lldb) po ad.mediaContent

<GADMediaContent: 0x2800f2550>


(lldb) po ad.mediaContent.aspectRatio

0

Printing description of ad->_internalNativeAd->_assets->_mediaContent->_mediatedNativeAd->_nativeAd->_dataModel->_image:

<FBAdImage: 0x2800830c0>


Printing description of ad->_internalNativeAd->_assets->_mediaContent->_mediatedNativeAd->_nativeAd->_dataModel->_image->_width:

(long long) _width = 750


Printing description of ad->_internalNativeAd->_assets->_mediaContent->_mediatedNativeAd->_nativeAd->_dataModel->_image->_height:

(long long) _height = 750



DPAdCell_m.png



As well as the aspect ratio from the FBNativeAd instance

DPAdCell_m.png

  (note this is a different instance hence it has a different aspect ratio)



So it is possible to get the correct aspect ratio with the following super fragile code

  CGFloat aspectRatio = ad.mediaContent.aspectRatio;

  if (aspectRatio == 0) {

      FBNativeAd *fbAd = [ad valueForKeyPath:@"_internalNativeAd._assets._mediatedNativeAd._nativeAd"];

      aspectRatio = fbAd.aspectRatio;

  }




Configuration:

I have video and carousel ads disabled on FB.

I am using manual installation not cocoa pods (App uses Carthage) and the app is in Objective-C. I updated the FB sdk to 5.5.0 and I am still getting the same issue. I also tried older versions of the FB Admob adapter and still had same issue.


Issue 2: Facebook Audience Network ads have large grey adChoice icon

When using the same Facebook SDK without Admob the adchoices view is just a single icon when using Admob a FB ad has 2 adchoices icons (shown in the previous screenshots). 

Does the FBAdapter change any properties on FBAdChoicesView https://developers.facebook.com/docs/reference/ios/current/class/FBAdChoicesView/  perhaps expandable? 


Thanks for your help,
Ben


Ben Callis

unread,
Sep 13, 2019, 8:50:37 AM9/13/19
to Google Mobile Ads SDK Developers
Any update on this?

Ben Callis

unread,
Oct 14, 2019, 6:17:25 PM10/14/19
to Google Mobile Ads SDK Developers
5.5.1.1 was released which was supposed to fix the size issue but sadly it still does not work when accessing the size before the view is drawn.

Are there plans to fix this?

neobie

unread,
Aug 19, 2022, 1:47:51 AM8/19/22
to Google Mobile Ads SDK Developers
Any update on this? Wondering why the Admob fb mediation is giving ugly icon unlike the Audience network native icon.

Mobile Ads SDK Forum Advisor

unread,
Aug 19, 2022, 5:53:39 AM8/19/22
to kaiya...@gmail.com, google-adm...@googlegroups.com

Hi Neobie,

Thank you for reaching out to us.

As per checking on the thread, my previous colleague already mentioned that, the size of the adChoice icon from the Facebook ads is determined by the Facebook SDK(Meta Audience Network) and the Meta Audience Network adapter (Facebook adapter) does not make any changes to the size of the adChoice icon. It would be best that you reach out to that team as they are better equipped to address concerns specific to adChoice icon size. Also, if you're using Meta Audience Network(Facebook), it would be best if you're using the latest version.

Regards,

Google Logo
Princess Pamela
Mobile Ads SDK Team
 


ref:_00D1U1174p._5004Q2dlSsh:ref
Reply all
Reply to author
Forward
0 new messages