commit | author | age
|
bad748
|
1 |
// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. |
W |
2 |
// |
|
3 |
// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, |
|
4 |
// copy, modify, and distribute this software in source code or binary form for use |
|
5 |
// in connection with the web services and APIs provided by Facebook. |
|
6 |
// |
|
7 |
// As with any software that integrates with the Facebook platform, your use of |
|
8 |
// this software is subject to the Facebook Developer Principles and Policies |
|
9 |
// [http://developers.facebook.com/policy/]. This copyright notice shall be |
|
10 |
// included in all copies or substantial portions of the software. |
|
11 |
// |
|
12 |
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
|
13 |
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS |
|
14 |
// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR |
|
15 |
// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER |
|
16 |
// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN |
|
17 |
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
|
18 |
|
|
19 |
#import <Foundation/Foundation.h> |
|
20 |
|
|
21 |
@protocol FBSDKAppGroupJoinDialogDelegate; |
|
22 |
|
|
23 |
/*! |
|
24 |
@abstract A dialog for joining app groups. |
|
25 |
*/ |
|
26 |
@interface FBSDKAppGroupJoinDialog : NSObject |
|
27 |
|
|
28 |
/*! |
|
29 |
@abstract Convenience method to build up an app group dialog with content and a delegate. |
|
30 |
@param groupID The ID for the group. |
|
31 |
@param delegate The receiver's delegate. |
|
32 |
*/ |
|
33 |
+ (instancetype)showWithGroupID:(NSString *)groupID |
|
34 |
delegate:(id<FBSDKAppGroupJoinDialogDelegate>)delegate; |
|
35 |
|
|
36 |
/*! |
|
37 |
@abstract The receiver's delegate or nil if it doesn't have a delegate. |
|
38 |
*/ |
|
39 |
@property (nonatomic, weak) id<FBSDKAppGroupJoinDialogDelegate> delegate; |
|
40 |
|
|
41 |
/*! |
|
42 |
@abstract The ID for group. |
|
43 |
*/ |
|
44 |
@property (nonatomic, copy) NSString *groupID; |
|
45 |
|
|
46 |
/*! |
|
47 |
@abstract A Boolean value that indicates whether the receiver can initiate an app group dialog. |
|
48 |
@discussion May return NO if the appropriate Facebook app is not installed and is required or an access token is |
|
49 |
required but not available. This method does not validate the content on the receiver, so this can be checked before |
|
50 |
building up the content. |
|
51 |
@see validateWithError: |
|
52 |
@result YES if the receiver can share, otherwise NO. |
|
53 |
*/ |
|
54 |
- (BOOL)canShow; |
|
55 |
|
|
56 |
/*! |
|
57 |
@abstract Begins the app group dialog from the receiver. |
|
58 |
@result YES if the receiver was able to show the dialog, otherwise NO. |
|
59 |
*/ |
|
60 |
- (BOOL)show; |
|
61 |
|
|
62 |
/*! |
|
63 |
@abstract Validates the content on the receiver. |
|
64 |
@param errorRef If an error occurs, upon return contains an NSError object that describes the problem. |
|
65 |
@return YES if the content is valid, otherwise NO. |
|
66 |
*/ |
|
67 |
- (BOOL)validateWithError:(NSError *__autoreleasing *)errorRef; |
|
68 |
|
|
69 |
@end |
|
70 |
|
|
71 |
/*! |
|
72 |
@abstract A delegate for FBSDKAppGroupJoinDialog. |
|
73 |
@discussion The delegate is notified with the results of the app group request as long as the application has |
|
74 |
permissions to receive the information. For example, if the person is not signed into the containing app, the shower |
|
75 |
may not be able to distinguish between completion of an app group request and cancellation. |
|
76 |
*/ |
|
77 |
@protocol FBSDKAppGroupJoinDialogDelegate <NSObject> |
|
78 |
|
|
79 |
/*! |
|
80 |
@abstract Sent to the delegate when the app group request completes without error. |
|
81 |
@param appGroupJoinDialog The FBSDKAppGroupJoinDialog that completed. |
|
82 |
@param results The results from the dialog. This may be nil or empty. |
|
83 |
*/ |
|
84 |
- (void)appGroupJoinDialog:(FBSDKAppGroupJoinDialog *)appGroupJoinDialog didCompleteWithResults:(NSDictionary *)results; |
|
85 |
|
|
86 |
/*! |
|
87 |
@abstract Sent to the delegate when the app group request encounters an error. |
|
88 |
@param appGroupJoinDialog The FBSDKAppGroupJoinDialog that completed. |
|
89 |
@param error The error. |
|
90 |
*/ |
|
91 |
- (void)appGroupJoinDialog:(FBSDKAppGroupJoinDialog *)appGroupJoinDialog didFailWithError:(NSError *)error; |
|
92 |
|
|
93 |
/*! |
|
94 |
@abstract Sent to the delegate when the app group dialog is cancelled. |
|
95 |
@param appGroupJoinDialog The FBSDKAppGroupJoinDialog that completed. |
|
96 |
*/ |
|
97 |
- (void)appGroupJoinDialogDidCancel:(FBSDKAppGroupJoinDialog *)appGroupJoinDialog; |
|
98 |
|
|
99 |
@end |