问题
Firstly let me show you my implementation of FBNativeAd:
func getNativeAd()
{
self.FBnativeAd = FBNativeAd(placementID: PLACEMENT_ID)
self.FBnativeAd.delegate = self
self.FBnativeAd.loadAd()
}
override func viewDidLoad() {
super.viewDidLoad()
func nativeAdDidLoad(nativeAd: FBNativeAd!) {
if ((self.FBnativeAd) != nil) {
self.FBnativeAd.unregisterView()
}
self.FBnativeAd = nativeAd
println(nativeAd.title)
}
With this code I always have the error : "Frequent Load". But it is working when I am in test mode. Could you help me?
回答1:
When running on the simulator, test ads will be shown by default.
To enable test ads on a device, add the following line of code before loading an ad: [FBAdSettings addTestDevice:@"HASHED ID"];. Use the hashed ID that is printed to the console when you first make a request to load an ad on a device.
Instead, to see non-test ads on your device, you must have the Facebook app installed and have logged in within the last 30 days. Also check to make sure you haven't opted out of ads on your device.
回答2:
Also, your code snippet doesn't include the function call registerViewForInteraction.
This isn't related with the issue you just described, but please make sure function registerViewForInteraction is called (see https://developers.facebook.com/docs/audience-network/ios/native-api for more details); otherwise, the impression logging as well as click won't be handled correctly.
来源:https://stackoverflow.com/questions/31625297/facebook-audience-network-frequent-load-error