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;
SwiftfuncadViewDidLoad(_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;
SwiftfuncadViewDidEnd(_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 aftershowAdFromRootViewController:
(if the ad has a playback failure).Declaration
Objective-C-(void)adView:(nonnullFBInstreamAdView*)adViewdidFailWithError:(nonnullNSError*)error;
SwiftfuncadView(_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;
SwiftoptionalfuncadViewDidClick(_adView:FBInstreamAdView)
Parameters
- Sent immediately before the impression of an FBInstreamAdView object will be logged.
Declaration
Objective-C-(void)adViewWillLogImpression:(nonnullFBInstreamAdView*)adView;
SwiftoptionalfuncadViewWillLogImpression(_adView:FBInstreamAdView)
Parameters