| | |
| | | |
| | | #import <FBSDKCoreKit/FBSDKCopying.h> |
| | | |
| | | /*! |
| | | @typedef NS_ENUM(NSUInteger, FBSDKGameRequestActionType) |
| | | @abstract Additional context about the nature of the request. |
| | | /** |
| | | NS_ENUM(NSUInteger, FBSDKGameRequestActionType) |
| | | Additional context about the nature of the request. |
| | | */ |
| | | typedef NS_ENUM(NSUInteger, FBSDKGameRequestActionType) |
| | | { |
| | | /*! No action type */ |
| | | /** No action type */ |
| | | FBSDKGameRequestActionTypeNone = 0, |
| | | /*! Send action type: The user is sending an object to the friends. */ |
| | | /** Send action type: The user is sending an object to the friends. */ |
| | | FBSDKGameRequestActionTypeSend, |
| | | /*! Ask For action type: The user is asking for an object from friends. */ |
| | | /** Ask For action type: The user is asking for an object from friends. */ |
| | | FBSDKGameRequestActionTypeAskFor, |
| | | /*! Turn action type: It is the turn of the friends to play against the user in a match. (no object) */ |
| | | /** Turn action type: It is the turn of the friends to play against the user in a match. (no object) */ |
| | | FBSDKGameRequestActionTypeTurn, |
| | | }; |
| | | |
| | | /*! |
| | | @typedef NS_ENUM(NSUInteger, FBSDKGameRequestFilters) |
| | | @abstract Filter for who can be displayed in the multi-friend selector. |
| | | /** |
| | | NS_ENUM(NSUInteger, FBSDKGameRequestFilters) |
| | | Filter for who can be displayed in the multi-friend selector. |
| | | */ |
| | | typedef NS_ENUM(NSUInteger, FBSDKGameRequestFilter) |
| | | { |
| | | /*! No filter, all friends can be displayed. */ |
| | | /** No filter, all friends can be displayed. */ |
| | | FBSDKGameRequestFilterNone = 0, |
| | | /*! Friends using the app can be displayed. */ |
| | | /** Friends using the app can be displayed. */ |
| | | FBSDKGameRequestFilterAppUsers, |
| | | /*! Friends not using the app can be displayed. */ |
| | | /** Friends not using the app can be displayed. */ |
| | | FBSDKGameRequestFilterAppNonUsers, |
| | | }; |
| | | |
| | | /*! |
| | | @abstract A model for a game request. |
| | | /** |
| | | A model for a game request. |
| | | */ |
| | | @interface FBSDKGameRequestContent : NSObject <FBSDKCopying, NSSecureCoding> |
| | | |
| | | /*! |
| | | @abstract Used when defining additional context about the nature of the request. |
| | | @discussion The parameter 'objectID' is required if the action type is either |
| | | /** |
| | | Used when defining additional context about the nature of the request. |
| | | |
| | | The parameter 'objectID' is required if the action type is either |
| | | 'FBSDKGameRequestSendActionType' or 'FBSDKGameRequestAskForActionType'. |
| | | @seealso objectID |
| | | |
| | | - SeeAlso:objectID |
| | | */ |
| | | @property (nonatomic, assign) FBSDKGameRequestActionType actionType; |
| | | |
| | | /*! |
| | | @abstract Compares the receiver to another game request content. |
| | | @param content The other content |
| | | @return YES if the receiver's values are equal to the other content's values; otherwise NO |
| | | /** |
| | | Compares the receiver to another game request content. |
| | | - Parameter content: The other content |
| | | - Returns: YES if the receiver's values are equal to the other content's values; otherwise NO |
| | | */ |
| | | - (BOOL)isEqualToGameRequestContent:(FBSDKGameRequestContent *)content; |
| | | |
| | | /*! |
| | | @abstract Additional freeform data you may pass for tracking. This will be stored as part of |
| | | /** |
| | | Additional freeform data you may pass for tracking. This will be stored as part of |
| | | the request objects created. The maximum length is 255 characters. |
| | | */ |
| | | @property (nonatomic, copy) NSString *data; |
| | | |
| | | /*! |
| | | @abstract This controls the set of friends someone sees if a multi-friend selector is shown. |
| | | /** |
| | | This controls the set of friends someone sees if a multi-friend selector is shown. |
| | | It is FBSDKGameRequestNoFilter by default, meaning that all friends can be shown. |
| | | If specify as FBSDKGameRequestAppUsersFilter, only friends who use the app will be shown. |
| | | On the other hands, use FBSDKGameRequestAppNonUsersFilter to filter only friends who do not use the app. |
| | | @discussion The parameter name is preserved to be consistent with the counter part on desktop. |
| | | |
| | | The parameter name is preserved to be consistent with the counter part on desktop. |
| | | */ |
| | | @property (nonatomic, assign) FBSDKGameRequestFilter filters; |
| | | |
| | | /*! |
| | | @abstract A plain-text message to be sent as part of the request. This text will surface in the App Center view |
| | | /** |
| | | A plain-text message to be sent as part of the request. This text will surface in the App Center view |
| | | of the request, but not on the notification jewel. Required parameter. |
| | | */ |
| | | @property (nonatomic, copy) NSString *message; |
| | | |
| | | /*! |
| | | @abstract The Open Graph object ID of the object being sent. |
| | | @seealso actionType |
| | | /** |
| | | The Open Graph object ID of the object being sent. |
| | | |
| | | - SeeAlso:actionType |
| | | */ |
| | | @property (nonatomic, copy) NSString *objectID; |
| | | |
| | | /*! |
| | | @abstract An array of user IDs, usernames or invite tokens (NSString) of people to send request. |
| | | @discussion These may or may not be a friend of the sender. If this is specified by the app, |
| | | /** |
| | | An array of user IDs, usernames or invite tokens (NSString) of people to send request. |
| | | |
| | | These may or may not be a friend of the sender. If this is specified by the app, |
| | | the sender will not have a choice of recipients. If not, the sender will see a multi-friend selector |
| | | |
| | | This is equivalent to the "to" parameter when using the web game request dialog. |
| | | */ |
| | | @property (nonatomic, copy) NSArray *recipients; |
| | | |
| | | /*! |
| | | @abstract An array of user IDs that will be included in the dialog as the first suggested friends. |
| | | /** |
| | | An array of user IDs that will be included in the dialog as the first suggested friends. |
| | | Cannot be used together with filters. |
| | | @discussion This is equivalent to the "suggestions" parameter when using the web game request dialog. |
| | | |
| | | This is equivalent to the "suggestions" parameter when using the web game request dialog. |
| | | */ |
| | | @property (nonatomic, copy) NSArray *recipientSuggestions; |
| | | |
| | | /*! |
| | | @deprecated Use `recipientSuggestions` instead. |
| | | /** |
| | | |
| | | - Warning:Use `recipientSuggestions` instead. |
| | | */ |
| | | @property (nonatomic, copy) NSArray *suggestions __attribute__ ((deprecated("use recipientSuggestions instead"))); |
| | | |
| | | /*! |
| | | @abstract The title for the dialog. |
| | | /** |
| | | The title for the dialog. |
| | | */ |
| | | @property (nonatomic, copy) NSString *title; |
| | | |
| | | /*! |
| | | @deprecated Use `recipients` instead. |
| | | /** |
| | | |
| | | - Warning:Use `recipients` instead. |
| | | */ |
| | | @property (nonatomic, copy) NSArray *to __attribute__ ((deprecated("use recipients instead"))); |
| | | |