Method signature

Method sets a number of banners to show at once for banner ads. Feature is available for all banner formats but only on web platform.

List of supported count options is provided by FAPI.UI.getBannerFormats method.

FAPI.invokeUIMethod("setBannersCount", bannersCount)

где:

  • bannersCount - number of banners to show.

Call example

function setBannerFormat() {
FAPI.invokeUIMethod("setBannersCount", 2)
}

Restrictions

Be aware of following restrictions when using this method;

  • banners count can be set only when banner ads are not active;
  • only options provided by FAPI.UI.getBannerFormats method can be used in this method.

Callback example

Method’s callback contains a status of banners count change attempt.

Callback if amount of banners was changed

method: “setBannersCount”

result: “ok”

data: “true”

Callback if amount of banners was not changed

method: “setBannersCount”

result: “error”

data: “false”

Examples

Multiple banners can be shown for every format that FAPI.UI.getBannerFormats method returns.

It is recommended to use outer banner formats but other formats can be used too.

Vertical outer banner example

Vertical banner example

Horizontal outer banner example

Horizontal banner example