commit | author | age
|
2e29a3
|
1 |
/* |
L |
2 |
* Copyright (c) Meta Platforms, Inc. and affiliates. |
|
3 |
* All rights reserved. |
|
4 |
* |
|
5 |
* This source code is licensed under the license found in the |
|
6 |
* LICENSE file in the root directory of this source tree. |
|
7 |
*/ |
|
8 |
|
|
9 |
#if !TARGET_OS_TV |
|
10 |
|
|
11 |
#import <Foundation/Foundation.h> |
|
12 |
|
|
13 |
#import <FBSDKCoreKit/FBSDKCoreKit.h> |
|
14 |
#import <FBSDKShareKit/FBSDKGameRequestURLProvider.h> |
|
15 |
#import <FBSDKShareKit/FBSDKSharingValidation.h> |
|
16 |
|
|
17 |
NS_ASSUME_NONNULL_BEGIN |
|
18 |
|
|
19 |
/** |
|
20 |
A model for a game request. |
|
21 |
*/ |
|
22 |
NS_SWIFT_NAME(GameRequestContent) |
|
23 |
@interface FBSDKGameRequestContent : NSObject <NSCopying, NSObject, FBSDKSharingValidation, NSSecureCoding> |
|
24 |
|
|
25 |
/** |
|
26 |
Used when defining additional context about the nature of the request. |
|
27 |
|
|
28 |
The parameter 'objectID' is required if the action type is either |
|
29 |
'FBSDKGameRequestSendActionType' or 'FBSDKGameRequestAskForActionType'. |
|
30 |
|
|
31 |
- SeeAlso:objectID |
|
32 |
*/ |
|
33 |
@property (nonatomic, assign) FBSDKGameRequestActionType actionType; |
|
34 |
|
|
35 |
/** |
|
36 |
Compares the receiver to another game request content. |
|
37 |
@param content The other content |
|
38 |
@return YES if the receiver's values are equal to the other content's values; otherwise NO |
|
39 |
*/ |
|
40 |
- (BOOL)isEqualToGameRequestContent:(FBSDKGameRequestContent *)content; |
|
41 |
|
|
42 |
/** |
|
43 |
Additional freeform data you may pass for tracking. This will be stored as part of |
|
44 |
the request objects created. The maximum length is 255 characters. |
|
45 |
*/ |
|
46 |
@property (nullable, nonatomic, copy) NSString *data; |
|
47 |
|
|
48 |
/** |
|
49 |
This controls the set of friends someone sees if a multi-friend selector is shown. |
|
50 |
It is FBSDKGameRequestNoFilter by default, meaning that all friends can be shown. |
|
51 |
If specify as FBSDKGameRequestAppUsersFilter, only friends who use the app will be shown. |
|
52 |
On the other hands, use FBSDKGameRequestAppNonUsersFilter to filter only friends who do not use the app. |
|
53 |
|
|
54 |
The parameter name is preserved to be consistent with the counter part on desktop. |
|
55 |
*/ |
|
56 |
@property (nonatomic, assign) FBSDKGameRequestFilter filters; |
|
57 |
|
|
58 |
/** |
|
59 |
A plain-text message to be sent as part of the request. This text will surface in the App Center view |
|
60 |
of the request, but not on the notification jewel. Required parameter. |
|
61 |
*/ |
|
62 |
@property (nonatomic, copy) NSString *message; |
|
63 |
|
|
64 |
/** |
|
65 |
The Open Graph object ID of the object being sent. |
|
66 |
|
|
67 |
- SeeAlso:actionType |
|
68 |
*/ |
|
69 |
@property (nonatomic, copy) NSString *objectID; |
|
70 |
|
|
71 |
/** |
|
72 |
An array of user IDs, usernames or invite tokens (NSString) of people to send request. |
|
73 |
|
|
74 |
These may or may not be a friend of the sender. If this is specified by the app, |
|
75 |
the sender will not have a choice of recipients. If not, the sender will see a multi-friend selector |
|
76 |
|
|
77 |
This is equivalent to the "to" parameter when using the web game request dialog. |
|
78 |
*/ |
|
79 |
@property (nonatomic, copy) NSArray<NSString *> *recipients; |
|
80 |
|
|
81 |
/** |
|
82 |
An array of user IDs that will be included in the dialog as the first suggested friends. |
|
83 |
Cannot be used together with filters. |
|
84 |
|
|
85 |
This is equivalent to the "suggestions" parameter when using the web game request dialog. |
|
86 |
*/ |
|
87 |
@property (nonatomic, copy) NSArray<NSString *> *recipientSuggestions; |
|
88 |
|
|
89 |
/** |
|
90 |
The title for the dialog. |
|
91 |
*/ |
|
92 |
@property (nonatomic, copy) NSString *title; |
|
93 |
|
|
94 |
/** |
|
95 |
The call to action for the dialog. |
|
96 |
*/ |
|
97 |
@property (nonatomic, copy) NSString *cta; |
|
98 |
|
|
99 |
@end |
|
100 |
|
|
101 |
NS_ASSUME_NONNULL_END |
|
102 |
|
|
103 |
#endif |