googleads-mobile-android-mediation
googleads-mobile-android-mediation copied to clipboard
[BUG?] FacebookAdapter findClosestSize method always returns 'null'
com.facebook.android:audience-network-sdk:5.3.0 com.google.ads.mediation:facebook:5.3.0.0 com.google.android.gms:play-services-ads:17.2.1
FacebookAdapter never returns banners because findClosestSize
always returns null
From adb logcat:
05-26 08:41:13.211 6557 6557 I FacebookAdapter: Potential ad sizes: [FULLx50_as, FULLx90_as, FULLx250_as]
05-26 08:41:13.211 6557 6557 W FacebookAdapter: The input ad size 393x50_as is not supported at this moment.
Hi, thanks for posting, can you share your client code for requesting the ad? What ad size are you specifying?
Hi Stowy,
I specify SMART_BANNER ad size. If i switch to BANNER, ads are showing fine. Here is the code: https://github.com/ratson/cordova-plugin-admob-free/tree/master/src/android
Thank you for your time ^^
I'm having the same issue:
I'm using SMART_BANNER
and I see many requests but 0% match rate as I describe here and I think its because of this "bug":
06-18 21:33:14.845 19468 19468 I FacebookAdapter: Potential ad sizes: [FULLx50_as, FULLx90_as, FULLx250_as]
06-18 21:33:14.845 19468 19468 W FacebookAdapter: The input ad size 360x50_as is not supported at this moment.
if I use BANNER
I see this:
06-18 22:08:57.916 4266 4266 I FacebookAdapter: Potential ad sizes: [320x50_as, 320x90_as, 320x250_as]
06-18 22:08:57.916 4266 4266 I FacebookAdapter: Found closest ad size: 320x50_as
06-18 22:08:58.037 4266 4266 E Ads : at com.google.ads.mediation.facebook.FacebookInitializer.initialize(FacebookInitializer.java:51)
06-18 22:08:58.037 4266 4266 E Ads : at com.google.ads.mediation.facebook.FacebookInitializer.initialize(FacebookInitializer.java:33)
06-18 22:08:58.037 4266 4266 E Ads : at com.google.ads.mediation.facebook.FacebookAdapter.requestBannerAd(FacebookAdapter.java:163)
I still dont see ads but I think that's because Facebook has no ads for me.... Tried on 3 phones though........
@tominou do you think my problem with 0% match rate is because I use SMART_BANNER
?
@rodrigograca31 Yes Im pretty sure it is. But FB should support SMART_BANNER, it did work fine until recent sdk releases.
Oh, ok. Thanks @tominou ! Let's hope it gets fixed. maybe I will dig deeper to find a sdk version that works....
I've now tried in a fourth phone and still no ads while using BANNER
but its probably because they are all in the same network and etc....
I should also configure mediation for my interstitial ad and that might help me debug stuff....
In your logs, size is not an issue when you use BANNER, but you still got some errors that may prevent FAN ads to work:
06-18 22:08:58.037 4266 4266 E Ads : at com.google.ads.mediation.facebook.FacebookInitializer.initialize(FacebookInitializer.java:51) 06-18 22:08:58.037 4266 4266 E Ads : at com.google.ads.mediation.facebook.FacebookInitializer.initialize(FacebookInitializer.java:33) 06-18 22:08:58.037 4266 4266 E Ads : at com.google.ads.mediation.facebook.FacebookAdapter.requestBannerAd(FacebookAdapter.java:163)
@tominou also, in case you didn't notice your plugin uses 5.3.0.0 and 5.4.0.0 was just released. Not sure if it fixes it though... but there's also 5.3.1.x....
wait.... were those erros? I was using adb logcat | grep -i facebook
so didnt see the whole output but maybe they are.....!
Seems 5.4.0 also doesnt support SMART_BANNER
....
Also seems there was changes in com.google.android.gms:play-services-ads:17.2.0
related to mediation.
Mediation: Added a new set of mediation adapter APIs that support initialization. Adapters implementing the new API implement the Adapter class.
@tominou you were correct! changing to 'BANNER' makes it work. (Even though I would prefer 'SMART_BANNER' because its probably better for advertisers, so its probably brings better revenue....)
you were also right about me having a bug. it was #133 .
@tominou Thanks a lot for your help!
I'm also having the same issue with 'SMART_BANNER' and the facebook adapter. I hope this gets fixed since SMART_BANNERs have a higher eCPM overall.
Regards!
According to the changelog, this was fixed: "Fixed an issue that caused Smart Banner Ad requests to fail." - https://developers.google.com/admob/android/mediation/facebook#facebook-android-mediation-adapter-changelog