Banner Ads are an in-app ad format that displays at the bottom of the screen as an overlay on your game. It is available for both portrait-mode and landscape-mode games.
Banner ads are available to all games that use Instant Games SDK 7.0.
Banner ads can be implemented easily, which leads to quick monetization of your game. In addition, banner ads are a great way to start monetizing with ads and get incremental In-App Ad (IAA) revenue. Some game developers see a 10% increase in IAA revenue after integrating with banner ads.
Games using the Instant Games SDK can integrate banner ads with minimal effort by calling the FBInstant.loadBannerAdAsync
and FBInstant.hideBannerAdAsync
APIs as shown in the following examples.
Size of the banner ad is 50dp in height, and fullscreen width based on the device.
FBInstant.loadBannerAdAsync( '123123123123_123123123123' // Replace with your Ad Placement ID. ).then(function () { console.log('loadBannerAdAsync resolved.'); }).catch(function(err) { console.error('Banner failed to load: ' + err.message); } );
FBInstant.hideBannerAdAsync().then(function () { console.log('hideBannerAdAsync resolved.'); }).catch(function (err) { console.error('hideBannerAdAsync rejected: ' + err.message); } );
If the Banner APIs aren't returned by FBInstant.getSupportedAPIs()
, or if a call to the Banner APIs returns a CLIENT_UNSUPPORTED_OPERATION error, verify that the following criteria are met:
In addition, keep in mind that Android integration requires additional processes for Instant Games; these processes are automatically triggered by successful banner integration on iOS or Desktop. If your Android game cannot access the Banner APIs, make sure that your game has integrated with the Banner API on iOS or Desktop. Once integration is complete you should expect the Android integration to be complete in two days.
We enforce a 45-second rate limit for calls to the FBInstant.loadBannerAdAsync()
API. If your call returns a RATE_LIMITED
error, please wait for an appropriate amount of time before you request another banner ad.