FBRewardedVideoAd Class Reference
Inherits from | NSObject |
Declared in | FBRewardedVideoAd.h |
Properties
adValid
@property
@property (nonatomic, getter=isAdValid, readonly) BOOL adValid
Discussion
@abstract Returns true if the rewarded video ad has been successfully loaded.
You should check isAdValid
before trying to show the ad.
Declared In
FBRewardedVideoAd.h
Instance Methods
initWithPlacementID:
@method
- (instancetype)initWithPlacementID:(NSString *)placementID
Parameters
- placementID
The id of the ad placement. You can create your placement id from Facebook developers page.
Discussion
@abstract This is a method to initialize an FBRewardedVideoAd matching the given placement id.
Declared In
FBRewardedVideoAd.h
initWithPlacementID:withUserID:withCurrency:
@method
- (instancetype)initWithPlacementID:(NSString *)placementID withUserID:(nullable NSString *)userID withCurrency:(nullable NSString *)currency
Parameters
- placementID
The id of the ad placement. You can create your placement id from Facebook developers page.
- userID
the id of the user
- currency
reward currency type
Discussion
@abstract This is a method to initialize an FBRewardedVideoAd matching the given placement id and allows the publisher to set the reward to give to a user.
Declared In
FBRewardedVideoAd.h
initWithPlacementID:withUserID:withCurrency:withAmount:
@method
- (instancetype)initWithPlacementID:(NSString *)placementID withUserID:(nullable NSString *)userID withCurrency:(nullable NSString *)currency withAmount:(NSInteger)amount
Parameters
- placementID
The id of the ad placement. You can create your placement id from Facebook developers page.
- userID
the id of the user
- currency
reward currency type
- amount
reward amount
Discussion
@abstract This is a method to initialize an FBRewardedVideoAd matching the given placement id and allows the publisher to set the reward to give to a user.
Declared In
FBRewardedVideoAd.h
loadAd
@method
- (void)loadAd
Discussion
@abstract Begins loading the FBRewardedVideoAd content.
You can implement rewardedVideoAdDidLoad:
and rewardedVideoAd:didFailWithError:
methods
of FBRewardedVideoAdDelegate
if you would like to be notified as loading succeeds or fails.
Declared In
FBRewardedVideoAd.h
showAdFromRootViewController:
@method
- (BOOL)showAdFromRootViewController:(UIViewController *)rootViewController
Parameters
- rootViewController
The view controller that will be used to present the rewarded video ad.
Discussion
@abstract Presents the rewarded video ad modally from the specified view controller.
You can implement rewardedVideoAdDidClick:
and rewardedVideoAdWillClose:
methods of FBRewardedVideoAdDelegate
if you would like to stay informed for those events.
Declared In
FBRewardedVideoAd.h
showAdFromRootViewController:animated:
@method
- (BOOL)showAdFromRootViewController:(UIViewController *)rootViewController animated:(BOOL)flag
Parameters
- rootViewController
The view controller that will be used to present the rewarded video ad.
- flag
Pass YES to animate the presentation; otherwise, pass NO.
Discussion
@abstract Presents the rewarded video ad modally from the specified view controller.
You can implement rewardedVideoAdDidClick:
and rewardedVideoAdWillClose:
methods of FBRewardedVideoAdDelegate
if you would like to stay informed for those events.
Declared In
FBRewardedVideoAd.h