小游戏广告不起作用 - 显示异步' 的空



我正试图将货币化添加到我的Facebook即时游戏中,它是通过Cocos Creator创建的。我已经检查了项目设置Facebook观众网络,也建立了游戏作为即时游戏。(Cocos Creator集成了Facebook Instant Games SDK,当游戏加载时,它会自动初始化(initializeAsync和startGameAsync(。(我的应用程序被批准了,我也在直播模式下尝试了广告。我测试了来自浏览器和手机的广告。初始广告应该在浏览器中工作,但我仍然收到这个错误:Uncaught TypeError:无法读取null或的属性"showAsync">Interstial无法预加载:客户端不支持消息:getinterstitialadasync

我的代码如下:

showInterstitialAd: function () {
var preloadedInterstitial = null;
FBInstant.getInterstitialAdAsync(
'1111111111111' // Your Ad Placement Id
).then(function (interstitial) {
// Load the Ad asynchronously
preloadedInterstitial = interstitial;
return preloadedInterstitial.loadAsync();
}).then(function () {
console.log('Interstitial preloaded');
}).catch(function (err) {
console.error('Interstitial failed to preload: ' + err.message);
});
preloadedInterstitial.showAsync()
.then(function () {
// Perform post-ad success operation
console.log('Interstitial ad finished successfully');
})
.catch(function (e) {
console.error(e.message);
});
},

我错过了什么?谢谢

也许你没有错过任何东西,Facebook即时游戏只有在你通过3K mps后才能发挥作用,现在你只能使用奖励视频和应用内购买。

最新更新