无法将Facebook插页式广告插入react-native应用

时间:2017-01-25 21:08:42

标签: javascript reactjs react-native

我想在我的本机应用程序中使用react-native-fbads(我从未使用过facebookAds)来插入插页式广告。

这是我在我的一个应用程序组件中完成的(// make the element invisible - display should still be with 'block' value $("#specifyDeathContainer").animate({opacity: 0.0001}, 100, function() { $(this).fadeOut(); // now - make display -> 'none' $("#surveyDeathContainer").fadeIn(100); // and make the new element visible with animation }); 之后):

react-native install react-native-fbads

但我一直收到此错误:import { InterstitialAdManager } from 'react-native-fbads'; constructor(props) { InterstitialAdManager.showAd("XXXXX_XXXXX") // this is line 16 .then(didClick => {console.log("clicked")}) .catch(error => {console.log("error")}) }

1 个答案:

答案 0 :(得分:1)

您是否尝试过react-native link react-native-fbads

这会自动将库的本机依赖项链接到您的iOS / Android项目。