iOS SDK Version

FBSDKGameRequestDialog

@interfaceFBSDKGameRequestDialog:NSObject
A dialog for sending game requests.
  • Undocumented

    Declaration

    Objective-C
    -(instancetype)initNS_DESIGNATED_INITIALIZERNS_SWIFT_UNAVAILABLE("Use init(content:delegate:) instead");
  • Unavailable
    Undocumented

    Declaration

    Objective-C
    +(instancetype)newNS_UNAVAILABLE;
  • Convenience method to build up a game request with content and a delegate.

    Declaration

    Objective-C
    +(nonnullinstancetype)dialogWithContent:(nonnullFBSDKGameRequestContent*)contentdelegate:(nullableid<FBSDKGameRequestDialogDelegate>)delegate;
    Swift
    convenienceinit(content:GameRequestContent,delegate:GameRequestDialogDelegate?)

    Parameters

    content
    The content for the game request.
    delegate
    The receiver’s delegate.
  • Convenience method to build up and show a game request with content and a delegate.

    Declaration

    Objective-C
    +(nonnullinstancetype)showWithContent:(nonnullFBSDKGameRequestContent*)contentdelegate:(nullableid<FBSDKGameRequestDialogDelegate>)delegate;

    Parameters

    content
    The content for the game request.
    delegate
    The receiver’s delegate.
  • The receiver’s delegate or nil if it doesn’t have a delegate.

    Declaration

    Objective-C
    @property(nonatomic,weak,readwrite,nullable)id<FBSDKGameRequestDialogDelegate>delegate;
    Swift
    weakvardelegate:GameRequestDialogDelegate?{getset}
  • The content for game request.

    Declaration

    Objective-C
    @property(nonatomic,copy,readwrite)FBSDKGameRequestContent*_Nonnullcontent;
    Swift
    @NSCopyingvarcontent:GameRequestContent{getset}
  • Specifies whether frictionless requests are enabled.

    Declaration

    Objective-C
    @property(nonatomic,assign,unsafe_unretained,readwrite,getter=isFrictionlessRequestsEnabled)BOOLfrictionlessRequestsEnabled;
    Swift
    varisFrictionlessRequestsEnabled:Bool{getset}
  • A Boolean value that indicates whether the receiver can initiate a game request.
    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.
    See
    validateWithError:

    Declaration

    Objective-C
    @property(nonatomic,readonly)BOOLcanShow;
    Swift
    varcanShow:Bool{get}

    Return Value

    YES if the receiver can share, otherwise NO.
  • Begins the game request from the receiver.

    Declaration

    Objective-C
    -(BOOL)show;
    Swift
    funcshow()->Bool

    Return Value

    YES if the receiver was able to show the dialog, otherwise NO.
  • Validates the content on the receiver.

    Declaration

    Objective-C
    -(BOOL)validateWithError:(NSError*_Nullable*_Nullable)errorRef;
    Swift
    funcvalidate()throws

    Parameters

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

    Return Value

    YES if the content is valid, otherwise NO.