Antoine Garcia
Antoine Garcia

Reputation: 143

Facebook Audience Network Frequent Load Error

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?

Upvotes: 0

Views: 3725

Answers (2)

Tanya Chen
Tanya Chen

Reputation: 46

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.

Upvotes: 1

Tanya Chen
Tanya Chen

Reputation: 46

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.

Upvotes: 1

Related Questions