FBSDKAppInviteDialog
有此級別的更新版本。前往查看 最新版本。

A dialog for sending App Invites.

Superclass:NSObject
Declared in:FBSDKAppInviteDialog.h
資產
content

The content for app invite.

@property (nonatomic, copy) FBSDKAppInviteContent *content;
delegate

The receiver's delegate or nil if it doesn't have a delegate.

@property (nonatomic, weak) id<FBSDKAppInviteDialogDelegate> delegate;
fromViewController

A UIViewController to present the dialog from.

@property (nonatomic, weak) UIViewController *fromViewController;
Discussion:

If not specified, the top most view controller will be automatically determined as best as possible.

類別方式
showFromViewController:withContent:delegate:

Convenience method to show a FBSDKAppInviteDialog

參數說明
viewController

A UIViewController to present the dialog from.

content

The content for the app invite.

delegate

The receiver's delegate.

+ (instancetype)
showFromViewController: (UIViewController *)viewController
withContent: (FBSDKAppInviteContent *)content
delegate: (id<FBSDKAppInviteDialogDelegate>)delegate;
showWithContent:delegate:
+ (instancetype)
showWithContent: (FBSDKAppInviteContent *)content
delegate: (id<FBSDKAppInviteDialogDelegate>)delegate
__attribute__((deprecated("use showFromViewController:withContent:delegate: instead")));
執行個體方法
canShow

A Boolean value that indicates whether the receiver can initiate an app invite.

- (BOOL) canShow;
Discussion:

May return NO if the appropriate Facebook app is not installed and is required or an access token is required but not available. This method does not validate the content on the receiver, so this can be checked before building up the content.

show

Begins the app invite from the receiver.

- (BOOL) show;
validateWithError:

Validates the content on the receiver.

參數說明
errorRef

If an error occurs, upon return contains an NSError object that describes the problem.

- (BOOL) validateWithError:(NSError *__autoreleasing *)errorRef;