Reputation: 220
I am trying to implement Audience network banners to my application. I have implemented it according to FB Develpoer guides like this and it is working fine on my main test phone of OnePlus 5. However, some other phones, like Samsung Galaxy S8, does not show the ad. It will result an ad error saying:
1203: The display format in the ad request does not match the display format specified for this placement. Each placement can only be used with a single display format. You can create multiple placements in order to use multiple display formats.
Weird thing here is that the error code and message do not match. According to FB integration checklist 1203 should mean:
Code=1203 “Not An App Admin, Developer or Tester”
And the code I should be seeing is
Code=1011 “Display Format Mismatch”
so I am not really sure which one is my actual problem.
I have thought that maybe the problem is screen ratios - OnePlus 5 has a "normal" 16:9 ratio while S8 and on other phone had a "weird" ratios of 19.5:9 and 2:1, but even then I have no idea how to fix it.
Application is currenty in Play Console beta relase.
Code snippet for loading my ad:
adContainer = findViewById(R.id.banner_container);
adView = new AdView(this, PLACEMENT_ID, AdSize.BANNER_HEIGHT_50);
loadAdConfig = adView.buildLoadAdConfig()
.withAdListener(this)
.build();
adContainer.addView(adView);
adView.loadAd(loadAdConfig);
Has anyone ever encountered such a case and can help me?
Thanks!
Upvotes: 4
Views: 3323
Reputation: 265
In my case it was because of load facebook NativeBanner
ad for inflate medium layout. It should be set false
to load facebook Native
ad.
new FacebookExtras().setNativeBanner(false).build()
Upvotes: 0
Reputation: 134
In my case it was because of the invalid test ID's, use real id's and append IMG_16_9_APP_INSTALL
before or see here https://developers.facebook.com/docs/audience-network/guides/test/inserted-code/
it should be like this
<string name="banner">IMG_16_9_APP_INSTALL#157702226198594_132322773865217</string>
Upvotes: 1