下载FacebookAdBridge.js
见对接群附件
初始化sdk
FbAdBridge.initAdSdk(['激励视频id1','激励视频id2','激励视频id3'],['插屏id1','插屏id2','插屏id3',],['bannerid1']);
banner 只需要一条id
判断广告状态
判断激励视频是否加载成功
FbAdBridge.isRewardVideoReady() ;
判断插屏是否加载成功
FbAdBridge.isInterstitialReady() ;
广告展示
展示激励视频
FbAdBridge.showRewardedVideo(function(success){
console.log(success);
});
展示插屏
FbAdBridge.showInterstitial(function(success){
console.log(success);
});
展示banner
FbAdBridge.showBanner();
隐藏banner
FbAdBridge.hideBanner();
参数设置
设置插屏播放间隔默认是15s
FbAdBridge.setInterstitialShowAdInterval(15);
设置banner刷新间隔默认是30s
FbAdBridge.setBannerInterval(30);
网友评论