横幅广告
1、请求广告
using TradplusSDK.Api;
//流量分组
Dictionary<string, string> customMap = {};
//local自定义Map,仅Android支持
Dictionary<string, object> localParams = {};
//设置附加参数 extra
TPBannerExtra extra = new TPBannerExtra();
extra.x = 0;
extra.y = 0;
extra.width = 320;
extra.height = 50;
extra.closeAutoShow = false;
extra.adPosition = TradplusBase.AdPosition.TopLeft;
extra.customMap = customMap;
extra.localParams = localParams;
extra.className = "tp_native_banner_ad_unit";
//请求广告
TradplusBanner.Instance().LoadBannerAd("在TP平台创建的广告位ID", sceneId, extra);
参数说明
unitId:TradPlus后台创建的广告位ID
- 开发者需正确填入,例如:unitId设置前后有空格,均会导致广告因拉不到配置而请求失败。