callstack / react-native-fbads

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

Native Ads are not Display in Android #150

Closed mahesh963 closed 5 years ago

mahesh963 commented 5 years ago

Hi, to everyone. I am using react-native-fbads in my project. I have followed the instructions and done the linking successfully. Created the Component for Native Ads to use the custom styles in my ListView as a Record. I have generated the Placement Id for Native Ads. Even though my App is reviewed successfully and I got status as Ready to Publish in https://developers.facebook.com in developers console

Current Behavior

Expected Behavior

erandagan commented 5 years ago

Hi there, Could you please:

Suraj-Tiwari commented 5 years ago

@mahesh963 Please confirm if you have removed AdSettings.addTestDevice(AdSettings.currentDeviceHash); and using a production build on real device and facebook app on your real device isn't related to your developer account also make sure to execute this AdSettings.clearTestDevices(); once.

mahesh963 commented 5 years ago

hi @erandagan thanks for your reply

class NativeAdView extends Component { render() { return (

      <View style={{flex:0.84,backgroundColor:'transparent',flexDirection:'column'}}>
        <TriggerableView style={{flex:0.5,backgroundColor:'transparent'}}>
          <Text style={[styles.carouselHeadTxt,{marginRight:3}]}>
              {this.props.nativeAd.headline}
          </Text>
        </TriggerableView>
        <TriggerableView style={{flex:0.5,backgroundColor:'transparent'}}>
          <Text style={{fontSize: scale(11.5),
              lineHeight: 18,marginRight:3,
              fontFamily: "GoogleSans-Regular",color:'#515365',marginTop:-1}}>
            {this.props.nativeAd.sponsoredTranslation}
          </Text>
        </TriggerableView>
      </View>
    </View>
    <TriggerableView style={{margin:scale(10)}}>
    <Text
      numberOfLines={6}
      style={[styles.messagE, {lineHeight:23,fontFamily:'GoogleSans-Regular', fontSize: scale(15)}]}>
      {this.props.nativeAd.linkDescription}
    </Text>
  </TriggerableView>
  <MediaView style={{width:windowSize.width,marginHorizontal:0,alignSelf:'center',height:windowSize.height*0.5}} />
    <View style={{ alignItems: 'center' }}>
      <TriggerableView
        style={{
          fontSize: scale(15),
          color: '#896fec',
          paddingVertical: 10,
          paddingHorizontal: 30,
          elevation: 3,
          borderTopWidth: 0,
          margin: 10,
          borderRadius: 6,
        }}
      >
        {this.props.nativeAd.callToActionText}
      </TriggerableView>
    </View>
  </View>
);

} }

export default withNativeAd(NativeAdView);


- I have done a **NativeAdView**(`<NativeAdView />`)  as a Component and used in Another Screen as

import NativeAdView from '@components/FBNativeAds/NativeAdView'; import { NativeAdsManager, AdSettings } from 'react-native-fbads'; const adsManager = new NativeAdsManager('232245xxxxxxxxx_259163xxxxxxxxx',10);

    <NativeAdView
      adsManager={adsManager}
      adChoicePosition="bottomRight"  />
a26364177 commented 5 years ago
danrevah commented 5 years ago

@a26364177 It seems like i'm having the same issue.. but I don't understand your third check: "Confirm that FB account have used the enterprise managment platform employee status currently set in the..?" .. wait what? what exactly do I need to check?

a26364177 commented 5 years ago

@danrevah Your FB account need to add in Monetization Manager admin. And use Advertising debugging tool to get real test ad request in Monetization Manager. Sorry for my poor english.

danrevah commented 5 years ago

I was able to debug using the way you showed me and I found the issue.. It was related to where I placed it on the page and for some reason it was only working for iOS.

Now its working.. Thanks!

erandagan commented 5 years ago

@mahesh963 are you still experiencing this issue?