iOS SDK Version

FBInstreamAdViewDelegate

Objective-C
@protocolFBInstreamAdViewDelegate<NSObject>
Swift
protocolFBInstreamAdViewDelegate:NSObjectProtocol
The FBInstreamAdViewDelegate protocol defines methods that allow the owner of an FBInstreamAdView to respond to various stages of ad operation.
  • Sent when an FBInstreamAdView instance successfully loads an ad.

    Declaration

    Objective-C
    -(void)adViewDidLoad:(nonnullFBInstreamAdView*)adView;
    Swift
    funcadViewDidLoad(_adView:FBInstreamAdView)

    Parameters

  • Sent when ad playback has completed and the FBInstreamAdView is ready to be deallocated. This method is mutually exclusive to adView:didFailWithError:, and it is impossible for both methods to be received for a single ad session.

    Declaration

    Objective-C
    -(void)adViewDidEnd:(nonnullFBInstreamAdView*)adView;
    Swift
    funcadViewDidEnd(_adView:FBInstreamAdView)

    Parameters

  • Sent when ad playback has failed to load or play an ad, and the FBInstreamAdView is ready to be deallocated. It is possible for this method to be called after loadAd (if they ad fails to load) or after showAdFromRootViewController: (if the ad has a playback failure).

    Declaration

    Objective-C
    -(void)adView:(nonnullFBInstreamAdView*)adViewdidFailWithError:(nonnullNSError*)error;
    Swift
    funcadView(_adView:FBInstreamAdView,didFailWithErrorerror:Error)

    Parameters

  • Sent when the user has touched the click-through interface element. The ad’s landing page will be shown.

    Declaration

    Objective-C
    -(void)adViewDidClick:(nonnullFBInstreamAdView*)adView;
    Swift
    optionalfuncadViewDidClick(_adView:FBInstreamAdView)

    Parameters

  • Sent immediately before the impression of an FBInstreamAdView object will be logged.

    Declaration

    Objective-C
    -(void)adViewWillLogImpression:(nonnullFBInstreamAdView*)adView;
    Swift
    optionalfuncadViewWillLogImpression(_adView:FBInstreamAdView)

    Parameters