FANDemandProvider

object FANDemandProvider : AsyncInterceptor

The Facebook Audience Network demand provider

The SDK will automatically inject the bidder token and app id into the outbound request to Nimbus when using the NimbusAdManager. When the FANDemandProvider is initialized it will fetch the bidder token in the background for use on future requests and install the FANAdRenderer to render any wins from Facebook. If you would like to customize the rendering of the the FANAdRenderer, you can instantiate your own delegate and override the customViewForRendering() method to create a custom native ad layout. Please note the publisher is responsible for setting all of the relevant information on the views created in a custom layout.

Properties

Link copied to clipboard
lateinit var appId: String

The Facebook app id.

Link copied to clipboard

The bidder token provided by Facebook Audience Network.

Link copied to clipboard

Flag that will force a Facebook test ad if Nimbus test mode is enabled.

Functions

Link copied to clipboard
fun initialize(context: Context, facebookAppId: String)

Initialize the FANDemandProvider and FANAdRenderer

Link copied to clipboard
open suspend override fun interceptRequest(request: NimbusRequest): NimbusRequestChange?
Link copied to clipboard
open fun modifyRequest(request: NimbusRequest)
Link copied to clipboard
open fun onAdResponse(nimbusResponse: NimbusResponse)
Link copied to clipboard
open fun onError(error: NimbusError)