#react-native #facebook #expo #ads
#react-native #Facebook #выставка #объявления
Вопрос:
Я пытаюсь внедрить рекламу в Facebook в свое приложение Expo.
Я добавил следующее в свой app.json
"facebookAppId": "00000000000000",
"facebookDisplayName": "MyAppNameHere"
Затем я создал свои идентификаторы размещения в консоли Facebook и добавил подобное объявление в свое приложение, следуя приведенному здесь руководству..
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)} />
Затем я получаю следующую ошибку, когда перехожу к просмотру, кто-нибудь знает, почему это так? Мое приложение все еще находится на рассмотрении на странице Facebook, может ли это быть?
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,
}