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 |
|
13e53a
|
21 |
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0 |
bad748
|
22 |
|
9febd9
|
23 |
/** |
13e53a
|
24 |
The error domain for all errors from FBSDKShareKit. |
9febd9
|
25 |
|
W |
26 |
Error codes from the SDK in the range 200-299 are reserved for this domain. |
bad748
|
27 |
*/ |
13e53a
|
28 |
FOUNDATION_EXPORT NSErrorDomain const FBSDKShareErrorDomain; |
H |
29 |
|
|
30 |
#else |
bad748
|
31 |
|
9febd9
|
32 |
/** |
13e53a
|
33 |
The error domain for all errors from FBSDKShareKit. |
H |
34 |
|
|
35 |
Error codes from the SDK in the range 200-299 are reserved for this domain. |
bad748
|
36 |
*/ |
13e53a
|
37 |
FOUNDATION_EXPORT NSString *const FBSDKShareErrorDomain; |
H |
38 |
|
|
39 |
#endif |
|
40 |
|
|
41 |
#ifndef NS_ERROR_ENUM |
|
42 |
#define NS_ERROR_ENUM(_domain, _name) \ |
|
43 |
enum _name: NSInteger _name; \ |
|
44 |
enum __attribute__((ns_error_domain(_domain))) _name: NSInteger |
|
45 |
#endif |
|
46 |
|
|
47 |
/** |
|
48 |
FBSDKShareError |
|
49 |
Error codes for FBSDKShareErrorDomain. |
|
50 |
*/ |
|
51 |
typedef NS_ERROR_ENUM(FBSDKShareErrorDomain, FBSDKShareError) |
bad748
|
52 |
{ |
9febd9
|
53 |
/** |
13e53a
|
54 |
Reserved. |
bad748
|
55 |
*/ |
13e53a
|
56 |
FBSDKShareErrorReserved = 200, |
bad748
|
57 |
|
9febd9
|
58 |
/** |
13e53a
|
59 |
The error code for errors from uploading open graph objects. |
bad748
|
60 |
*/ |
13e53a
|
61 |
FBSDKShareErrorOpenGraph, |
bad748
|
62 |
|
9febd9
|
63 |
/** |
13e53a
|
64 |
The error code for when a sharing dialog is not available. |
9febd9
|
65 |
|
13e53a
|
66 |
Use the canShare methods to check for this case before calling show. |
bad748
|
67 |
*/ |
13e53a
|
68 |
FBSDKShareErrorDialogNotAvailable, |
bad748
|
69 |
|
9febd9
|
70 |
/** |
bad748
|
71 |
@The error code for unknown errors. |
W |
72 |
*/ |
13e53a
|
73 |
FBSDKShareErrorUnknown, |
bad748
|
74 |
}; |
13e53a
|
75 |
|
H |
76 |
/** |
|
77 |
Deprecated |
|
78 |
*/ |
|
79 |
typedef NS_ENUM(NSInteger, FBSDKShareErrorCode) |
|
80 |
{ |
|
81 |
FBSDKShareReservedErrorCode DEPRECATED_MSG_ATTRIBUTE("use FBSDKShareErrorReserved instead") = 200, |
|
82 |
FBSDKShareOpenGraphErrorCode DEPRECATED_MSG_ATTRIBUTE("use FBSDKShareErrorOpenGraph instead"), |
|
83 |
FBSDKShareDialogNotAvailableErrorCode DEPRECATED_MSG_ATTRIBUTE("use FBSDKShareErrorDialogNotAvailable instead"), |
|
84 |
FBSDKShareUnknownErrorCode DEPRECATED_MSG_ATTRIBUTE("use FBSDKShareErrorUnknown instead"), |
|
85 |
} DEPRECATED_MSG_ATTRIBUTE("use FBSDKShareError instead"); |