local function adListener( event ) if ( event.phase == "init" ) then -- Successful initialization print( event.isError ) -- Load a banner ad fbAudienceNetwork.load( "banner", placementID, "BANNER\_HEIGHT\_50" ) elseif ( event.phase == "loaded" ) then -- The ad was successfully loaded print( event.type ) print( event.placementId ) fbAudienceNetwork.show( event.type, event.placementId, { yAlign="bottom" } ) elseif ( event.phase == "failed" ) then -- The ad failed to load print( event.type ) print( event.placementId ) print( event.isError ) print( event.response ) fbAudienceNetwork.load( "banner", placementID, "BANNER\_HEIGHT\_50" ) -- yes or no ? end end
If we get the event.phase == “failed”, should we call again fbAudienceNetwork.load inside this event?
Or will facebook try to server ads every N seconds as defined when creating the ad?
Same question for “loaded” phase.
Is one “show” enough and the ads will be swapped every N seconds?
Or do we have to call a new “load” inside “loaded”?