iOS SDK Version

FBNativeAdDelegate

@protocolFBNativeAdDelegate<NSObject>
The methods declared by the FBNativeAdDelegate protocol allow the adopting delegate to respond to messages from the FBNativeAd class and thus respond to operations such as whether the native ad has been loaded.
  • Sent when an FBNativeAd has been successfully loaded.

    Declaration

    Objective-C
    -(void)nativeAdDidLoad:(nonnullFBNativeAd*)nativeAd;
    Swift
    optionalfuncnativeAdDidLoad(_nativeAd:FBNativeAd)

    Parameters

  • Sent when an FBNativeAd has succesfully downloaded all media

    Declaration

    Objective-C
    -(void)nativeAdDidDownloadMedia:(nonnullFBNativeAd*)nativeAd;
    Swift
    optionalfuncnativeAdDidDownloadMedia(_nativeAd:FBNativeAd)
  • Sent immediately before the impression of an FBNativeAd object will be logged.

    Declaration

    Objective-C
    -(void)nativeAdWillLogImpression:(nonnullFBNativeAd*)nativeAd;
    Swift
    optionalfuncnativeAdWillLogImpression(_nativeAd:FBNativeAd)

    Parameters

  • Sent when an FBNativeAd is failed to load.

    Declaration

    Objective-C
    -(void)nativeAd:(nonnullFBNativeAd*)nativeAddidFailWithError:(nonnullNSError*)error;
    Swift
    optionalfuncnativeAd(_nativeAd:FBNativeAd,didFailWithErrorerror:Error)

    Parameters

  • Sent after an ad has been clicked by the person.

    Declaration

    Objective-C
    -(void)nativeAdDidClick:(nonnullFBNativeAd*)nativeAd;
    Swift
    optionalfuncnativeAdDidClick(_nativeAd:FBNativeAd)

    Parameters

  • When an ad is clicked, the modal view will be presented. And when the user finishes the interaction with the modal view and dismiss it, this message will be sent, returning control to the application.

    Declaration

    Objective-C
    -(void)nativeAdDidFinishHandlingClick:(nonnullFBNativeAd*)nativeAd;
    Swift
    optionalfuncnativeAdDidFinishHandlingClick(_nativeAd:FBNativeAd)

    Parameters