iOS SDK Version

FBSDKGameRequestDialogDelegate

@protocolFBSDKGameRequestDialogDelegate<NSObject>
A delegate for FBSDKGameRequestDialog.
The delegate is notified with the results of the game request as long as the application has permissions to receive the information. For example, if the person is not signed into the containing app, the shower may not be able to distinguish between completion of a game request and cancellation.
  • Sent to the delegate when the game request completes without error.

    Declaration

    Objective-C
    -(void)gameRequestDialog:(nonnullFBSDKGameRequestDialog*)gameRequestDialogdidCompleteWithResults:(nonnullNSDictionary<NSString*,id>*)results;
    Swift
    funcgameRequestDialog(_gameRequestDialog:GameRequestDialog,didCompleteWithResultsresults:[String:Any])

    Parameters

    gameRequestDialog
    The FBSDKGameRequestDialog that completed.
    results
    The results from the dialog. This may be nil or empty.
  • Sent to the delegate when the game request encounters an error.

    Declaration

    Objective-C
    -(void)gameRequestDialog:(nonnullFBSDKGameRequestDialog*)gameRequestDialogdidFailWithError:(nonnullNSError*)error;
    Swift
    funcgameRequestDialog(_gameRequestDialog:GameRequestDialog,didFailWithErrorerror:Error)

    Parameters

    gameRequestDialog
    The FBSDKGameRequestDialog that completed.
    error
    The error.
  • Sent to the delegate when the game request dialog is cancelled.

    Declaration

    Objective-C
    -(void)gameRequestDialogDidCancel:(nonnullFBSDKGameRequestDialog*)gameRequestDialog;
    Swift
    funcgameRequestDialogDidCancel(_gameRequestDialog:GameRequestDialog)

    Parameters

    gameRequestDialog
    The FBSDKGameRequestDialog that completed.