callstack / react-native-fbads

Facebook Audience SDK integration for React Native
MIT License
439 stars 142 forks source link

Why banner ads not shown #61

Closed tiendq closed 6 years ago

tiendq commented 7 years ago

I tried to show a banner for testing but there is only a blank banner at the bottom of screen. No ad at all.

Is there additional steps required to test ads?

Thanks,

RN code:

<BannerView
          type="standard"
          placementId="abc_xyz"
          onClick={() => console.log('click')}
          onError={(err) => console.log('error', err)}
/>

My placement for this banner (removed placement ID):

screen shot 2017-05-23 at 2 47 32 pm
galcivar commented 6 years ago

I have the same issue

eahang commented 6 years ago

I got blank ads for the first time but after reloading (without clear app in memory) it shows normally. The error is show like this: image

Do you know how to fix it?

BeckZero commented 6 years ago

+1 same here...

gesf commented 6 years ago

I am also having that proxy issue...

kkusanagi commented 6 years ago

I'm not sure also.

In DEBUG mode, it did not show anything. need add code as below. (Remember to remove this when in RELEASE mode)

componentWillMount(){
AdSettings.clearTestDevices();
AdSettings.addTestDevice(device_id);
}

The device_id, you can find it through the log. it will mention you to this code with your device hash id. Oh, the AdSettings. currentDeviceHash did not work.

In RELEASE mode, it did show the ads. Try put your apps to LIVE status in facebook developer page.

Still cannot? Then you need to add below into build.gradle

dependencies {
  ...
  compile 'com.facebook.android:audience-network-sdk:4.+'
}
teyou commented 6 years ago

my BannerView is not showing anything too. :(

leokaessner commented 6 years ago

Same here. Only works on devices where I'm logged in with my facebook account. For all others I get a huge increase of CPU and memory usage and app freezes

jaronsmith2006 commented 6 years ago

Any solution with that proxy error ? Test ad works for 1-2 times. then after it suddenly stopped working. Any correct sample code to implement facebook ad will help.

jaronsmith2006 commented 6 years ago

@eahang any solution you found ?

eahang commented 6 years ago

@jaronsmith2006 Now it works as normal. in render function add InterstitialAdManager InterstitialAdManager.showAd(PLACEMENT_ID)

<BannerView
       placementId={PLACEMENT_ID}
       type="standard"
        onError={err => {
              console.log(err);
        }}
 />
jaronsmith2006 commented 6 years ago

@eahang Yes.. applied that in same way only.. Test ads were appeared initially for 2-3 times. Banner and intertitial both. But then after when I re-run the app.. Its just simply gives blank banner area. And crashing app after sometime.

erandagan commented 6 years ago

The latest version of this package should be working. If you're still having trouble, please open a new issue with full reproduction. Thanks!

shradhdhaVek commented 3 years ago

Banner ads not show in react native android

babarbahadur commented 3 years ago

Banner ads does not show in react native android as shows following error screenshot

lbneves93 commented 1 year ago

I got the same error. In my case was cause I'm trying to show a Banner Ad, but using a placementId from an Interstitial Ad.