commit | author | age
|
49b883
|
1 |
// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. |
L |
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 "TargetConditionals.h" |
|
20 |
|
|
21 |
#if !TARGET_OS_TV |
|
22 |
|
|
23 |
#import <UIKit/UIKit.h> |
|
24 |
|
|
25 |
NS_ASSUME_NONNULL_BEGIN |
|
26 |
|
|
27 |
@class FBSDKReferralManagerResult; |
|
28 |
|
|
29 |
/** |
|
30 |
Describes the call back to the FBSDKReferralManager |
|
31 |
@param result the result of the referral |
|
32 |
@param error the referral error, if any. |
|
33 |
*/ |
|
34 |
typedef void (^FBSDKReferralManagerResultBlock)(FBSDKReferralManagerResult *_Nullable result, |
|
35 |
NSError *_Nullable error) |
|
36 |
NS_SWIFT_NAME(ReferralManagerResultBlock); |
|
37 |
|
|
38 |
/** |
|
39 |
`FBSDKReferralManager` provides methods for starting the referral process. |
|
40 |
*/ |
|
41 |
NS_SWIFT_NAME(ReferralManager) |
|
42 |
@interface FBSDKReferralManager : NSObject |
|
43 |
|
|
44 |
/** |
|
45 |
Initialize a new instance with the provided view controller |
|
46 |
@param viewController the view controller to present from. If nil, the topmost view controller will be automatically determined as best as possible. |
|
47 |
*/ |
|
48 |
- (instancetype)initWithViewController:(nullable UIViewController *)viewController; |
|
49 |
|
|
50 |
/** |
|
51 |
Open the referral dialog. |
|
52 |
@param handler the callback. |
|
53 |
*/ |
|
54 |
-(void)startReferralWithCompletionHandler:(nullable FBSDKReferralManagerResultBlock)handler; |
|
55 |
|
|
56 |
@end |
|
57 |
|
|
58 |
NS_ASSUME_NONNULL_END |
|
59 |
|
|
60 |
#endif |