iOS SDK Version

FBInstreamAdView

Deprecated
Instream ads have been deprecated.
Objective-C
@interfaceFBInstreamAdView:UIView
Swift
classFBInstreamAdView:UIView
A customized UIView to display an instream video ad by Facebook.
  • Returns YES if the instream ad has been successfully loaded.
    Note that the adView:didFailWithError: delegate method will be also be called instead of adViewDidLoad: if the ad fails to load for any reason.

    Declaration

    Objective-C
    @property(nonatomic,readonly,getter=isAdValid)BOOLadValid;
    Swift
    varisAdValid:Bool{get}
  • This property must be set prior to calling loadAd, so that delegate method calls are received and handled.

    Declaration

    Objective-C
    @property(nonatomic,weak,nullable)id<FBInstreamAdViewDelegate>delegate;
    Swift
    weakvardelegate:FBInstreamAdViewDelegate?{getset}
  • Typed access to the id of the ad placement.

    Declaration

    Objective-C
    @property(nonatomic,copy,readonly)NSString*_NonnullplacementID;
    Swift
    varplacementID:String{get}
  • FBAdExtraHint to provide extra info

    Declaration

    Objective-C
    @property(nonatomic,strong,nullable)FBAdExtraHint*extraHint;
    Swift
    varextraHint:FBAdExtraHint?{getset}
  • Deprecated
    Instream ads have been deprecated. Initialiser will return nil.
    Initializes and returns a newly allocated FBInstreamAdView object with the given placement id.

    Declaration

    Objective-C
    -(nullableinstancetype)initWithPlacementID:(nonnullNSString*)placementID;
    Swift
    init?(placementID:String)

    Parameters

  • Deprecated
    Instream ads have been deprecated. Calling this method will have no effect.
    Begins loading ad content.
    You should implement adViewDidLoad: and adView:didFailWithError: methods of FBInstreamAdViewDelegate to be notified when loading succeeds or fails.

    Declaration

    Objective-C
    -(void)loadAd;
    Swift
    funcloadAd()
  • Deprecated
    Instream ads have been deprecated. Calling this method will have no effect.
    Begins loading ad content from a bid payload attained through a server side bid.
    You can implement adViewDidLoad: and adView:didFailWithError: methods of FBInstreamAdViewDelegate to be notified when loading succeeds or fails.

    Declaration

    Objective-C
    -(void)loadAdWithBidPayload:(nonnullNSString*)bidPayload;
    Swift
    funcloadAd(withBidPayloadbidPayload:String)

    Parameters

  • Deprecated
    Instream ads have been deprecated. Calling this method will have no effect.
    Begins ad playback. This method should only be called after an adViewDidLoad: call has been received.

    Declaration

    Objective-C
    -(BOOL)showAdFromRootViewController:(nullableUIViewController*)rootViewController;
    Swift
    funcshowAd(fromRootViewControllerrootViewController:UIViewController?)->Bool

    Parameters