I am trying to implement Facebook Ads on my Expo app.
I have added the following to my app.json
"facebookAppId": "00000000000000",
"facebookDisplayName": "MyAppNameHere"
I have then created my placement ID's in the Facebook console and added the ad like this in my app following the guide here..
https://docs.expo.io/versions/latest/sdk/facebook-ads/
import * as FacebookAds from "expo-ads-facebook";
FacebookAds.AdSettings.addTestDevice(FacebookAds.AdSettings.currentDeviceHash);
<FacebookAds.BannerAd placementId="PlacementIDHere..." type="standard" onPress={() => console.log("click")} onError={(error) => console.log("error", error)} />
I am then getting the following error when I go to the view, does anyone know why this is? My app is still in review on the Facebook page, could this be it?
error SyntheticEvent {
"_dispatchInstances": FiberNode {
"tag": 5,
"key": null,
"type": "ViewManagerAdapter_CTKBannerView",
},
"_dispatchListeners": [Function onError],
"_targetInst": FiberNode {
"tag": 5,
"key": null,
"type": "ViewManagerAdapter_CTKBannerView",
},
"bubbles": undefined,
"cancelable": undefined,
"currentTarget": 597,
"defaultPrevented": undefined,
"dispatchConfig": Object {
"registrationName": "onAdError",
},
"eventPhase": undefined,
"isDefaultPrevented": [Function functionThatReturnsFalse],
"isPropagationStopped": [Function functionThatReturnsFalse],
"isTrusted": undefined,
"nativeEvent": Object {
"message": "Error Domain=com.facebook.ads.sdk Code=1002 \"Ad was re-loaded too frequently\" UserInfo={NSLocalizedDescription=Ad was re-loaded too frequently, FBAdErrorDetailKey={
}}",
"target": 597,
"userInfo": Object {
"FBAdErrorDetailKey": Object {},
"NSLocalizedDescription": "Ad was re-loaded too frequently",
},
},
"target": 597,
"timeStamp": 1603004611528,
"type": undefined,
}