commit | author | age
|
d1f6ab
|
1 |
// |
H |
2 |
// WAFBGameRequestContent.h |
|
3 |
// WASdkIntfUI |
|
4 |
// |
|
5 |
// Created by wuyx on 16/3/15. |
|
6 |
// Copyright © 2016年 GHW-T-01. All rights reserved. |
|
7 |
// |
|
8 |
|
|
9 |
#import <Foundation/Foundation.h> |
|
10 |
|
|
11 |
/*! |
|
12 |
@typedef NS_ENUM(NSUInteger, WAFBGameRequestActionType) |
|
13 |
@abstract Additional context about the nature of the request. |
|
14 |
*/ |
|
15 |
typedef NS_ENUM(NSUInteger, WAGameRequestActionType) |
|
16 |
{ |
|
17 |
/*! No action type */ |
|
18 |
WAGameRequestActionTypeNone = 0, |
|
19 |
/*! Send action type: The user is sending an object to the friends. */ |
|
20 |
WAGameRequestActionTypeSend, |
|
21 |
/*! Ask For action type: The user is asking for an object from friends. */ |
|
22 |
WAGameRequestActionTypeAskFor, |
|
23 |
/*! Turn action type: It is the turn of the friends to play against the user in a match. (no object) */ |
|
24 |
WAGameRequestActionTypeTurn, |
|
25 |
|
|
26 |
WAGameRequestActionInvite, |
|
27 |
|
|
28 |
WAGameRequestActionRequest |
|
29 |
}; |
|
30 |
|
|
31 |
@interface WAGameRequestContent : NSObject |
|
32 |
/*! |
|
33 |
@abstract Used when defining additional context about the nature of the request. |
|
34 |
@discussion The parameter 'objectID' is required if the action type is either |
|
35 |
'WAFBGameRequestActionTypeSend' or 'WAFBGameRequestActionTypeAskFor'. |
|
36 |
@seealso objectID |
|
37 |
*/ |
|
38 |
@property (nonatomic, assign) WAGameRequestActionType actionType; |
|
39 |
|
|
40 |
/*! |
|
41 |
@abstract Additional freeform data you may pass for tracking. This will be stored as part of |
|
42 |
the request objects created. The maximum length is 255 characters. |
|
43 |
*/ |
|
44 |
@property (nonatomic, copy) NSString *data; |
|
45 |
|
|
46 |
/*! |
|
47 |
@abstract This controls the set of friends someone sees if a multi-friend selector is shown. |
|
48 |
It is FBSDKGameRequestNoFilter by default, meaning that all friends can be shown. |
|
49 |
If specify as FBSDKGameRequestAppUsersFilter, only friends who use the app will be shown. |
|
50 |
On the other hands, use FBSDKGameRequestAppNonUsersFilter to filter only friends who do not use the app. |
|
51 |
@discussion The parameter name is preserved to be consistent with the counter part on desktop. |
|
52 |
*/ |
|
53 |
//@property (nonatomic, assign) FBSDKGameRequestFilter filters; |
|
54 |
|
|
55 |
/*! |
|
56 |
@abstract A plain-text message to be sent as part of the request. This text will surface in the App Center view |
|
57 |
of the request, but not on the notification jewel. Required parameter. |
|
58 |
*/ |
|
59 |
@property (nonatomic, copy) NSString *message; |
|
60 |
|
|
61 |
/*! |
|
62 |
@abstract The Open Graph object ID of the object being sent. |
|
63 |
@seealso actionType |
|
64 |
*/ |
|
65 |
@property (nonatomic, copy) NSString *objectID; |
|
66 |
|
|
67 |
/*! |
|
68 |
@abstract An array of user IDs, usernames or invite tokens (NSString) of people to send request. |
|
69 |
@discussion These may or may not be a friend of the sender. If this is specified by the app, |
|
70 |
the sender will not have a choice of recipients. If not, the sender will see a multi-friend selector |
|
71 |
|
|
72 |
This is equivalent to the "to" parameter when using the web game request dialog. |
|
73 |
*/ |
|
74 |
@property (nonatomic, copy) NSArray *recipients; |
|
75 |
|
|
76 |
/*! |
|
77 |
@abstract An array of user IDs that will be included in the dialog as the first suggested friends. |
|
78 |
Cannot be used together with filters. |
|
79 |
@discussion This is equivalent to the "suggestions" parameter when using the web game request dialog. |
|
80 |
*/ |
|
81 |
@property (nonatomic, copy) NSArray *recipientSuggestions; |
|
82 |
|
|
83 |
/*! |
|
84 |
@abstract The title for the dialog. |
|
85 |
*/ |
|
86 |
@property (nonatomic, copy) NSString *title; |
|
87 |
|
|
88 |
|
|
89 |
@end |