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 FBSDKLoginKit |
9febd9
|
25 |
|
W |
26 |
Error codes from the SDK in the range 300-399 are reserved for this domain. |
bad748
|
27 |
*/ |
13e53a
|
28 |
FOUNDATION_EXPORT NSErrorDomain const FBSDKLoginErrorDomain; |
H |
29 |
|
|
30 |
#else |
bad748
|
31 |
|
9febd9
|
32 |
/** |
13e53a
|
33 |
The error domain for all errors from FBSDKLoginKit |
H |
34 |
|
|
35 |
Error codes from the SDK in the range 300-399 are reserved for this domain. |
|
36 |
*/ |
|
37 |
FOUNDATION_EXPORT NSString *const FBSDKLoginErrorDomain; |
|
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 |
FBSDKLoginError |
9febd9
|
49 |
Error codes for FBSDKLoginErrorDomain. |
bad748
|
50 |
*/ |
13e53a
|
51 |
typedef NS_ERROR_ENUM(FBSDKLoginErrorDomain, FBSDKLoginError) |
bad748
|
52 |
{ |
9febd9
|
53 |
/** |
W |
54 |
Reserved. |
bad748
|
55 |
*/ |
13e53a
|
56 |
FBSDKLoginErrorReserved = 300, |
9febd9
|
57 |
/** |
W |
58 |
The error code for unknown errors. |
bad748
|
59 |
*/ |
13e53a
|
60 |
FBSDKLoginErrorUnknown, |
bad748
|
61 |
|
9febd9
|
62 |
/** |
W |
63 |
The user's password has changed and must log in again |
bad748
|
64 |
*/ |
13e53a
|
65 |
FBSDKLoginErrorPasswordChanged, |
9febd9
|
66 |
/** |
W |
67 |
The user must log in to their account on www.facebook.com to restore access |
bad748
|
68 |
*/ |
13e53a
|
69 |
FBSDKLoginErrorUserCheckpointed, |
9febd9
|
70 |
/** |
W |
71 |
Indicates a failure to request new permissions because the user has changed. |
bad748
|
72 |
*/ |
13e53a
|
73 |
FBSDKLoginErrorUserMismatch, |
9febd9
|
74 |
/** |
W |
75 |
The user must confirm their account with Facebook before logging in |
bad748
|
76 |
*/ |
13e53a
|
77 |
FBSDKLoginErrorUnconfirmedUser, |
bad748
|
78 |
|
9febd9
|
79 |
/** |
W |
80 |
The Accounts framework failed without returning an error, indicating the |
bad748
|
81 |
app's slider in the iOS Facebook Settings (device Settings -> Facebook -> App Name) has |
W |
82 |
been disabled. |
|
83 |
*/ |
13e53a
|
84 |
FBSDKLoginErrorSystemAccountAppDisabled, |
9febd9
|
85 |
/** |
W |
86 |
An error occurred related to Facebook system Account store |
bad748
|
87 |
*/ |
13e53a
|
88 |
FBSDKLoginErrorSystemAccountUnavailable, |
9febd9
|
89 |
/** |
W |
90 |
The login response was missing a valid challenge string. |
bad748
|
91 |
*/ |
13e53a
|
92 |
FBSDKLoginErrorBadChallengeString, |
bad748
|
93 |
}; |
9f077b
|
94 |
|
H |
95 |
/** |
13e53a
|
96 |
FBSDKDeviceLoginError |
9f077b
|
97 |
Error codes for FBSDKDeviceLoginErrorDomain. |
H |
98 |
*/ |
13e53a
|
99 |
typedef NS_ERROR_ENUM(FBSDKLoginErrorDomain, FBSDKDeviceLoginError) { |
9f077b
|
100 |
/** |
H |
101 |
Your device is polling too frequently. |
|
102 |
*/ |
13e53a
|
103 |
FBSDKDeviceLoginErrorExcessivePolling = 1349172, |
9f077b
|
104 |
/** |
H |
105 |
User has declined to authorize your application. |
|
106 |
*/ |
13e53a
|
107 |
FBSDKDeviceLoginErrorAuthorizationDeclined = 1349173, |
9f077b
|
108 |
/** |
H |
109 |
User has not yet authorized your application. Continue polling. |
|
110 |
*/ |
13e53a
|
111 |
FBSDKDeviceLoginErrorAuthorizationPending = 1349174, |
9f077b
|
112 |
/** |
H |
113 |
The code you entered has expired. |
|
114 |
*/ |
13e53a
|
115 |
FBSDKDeviceLoginErrorCodeExpired = 1349152 |
9f077b
|
116 |
}; |
13e53a
|
117 |
|
H |
118 |
/** |
|
119 |
Deprecated |
|
120 |
*/ |
|
121 |
typedef NS_ENUM(NSInteger, FBSDKLoginErrorCode) |
|
122 |
{ |
|
123 |
FBSDKLoginReservedErrorCode DEPRECATED_MSG_ATTRIBUTE("use FBSDKLoginErrorReserved instead") = FBSDKLoginErrorReserved, |
|
124 |
FBSDKLoginUnknownErrorCode DEPRECATED_MSG_ATTRIBUTE("use FBSDKLoginErrorUnknown instead"), |
|
125 |
FBSDKLoginPasswordChangedErrorCode DEPRECATED_MSG_ATTRIBUTE("use FBSDKLoginErrorPasswordChanged instead"), |
|
126 |
FBSDKLoginUserCheckpointedErrorCode DEPRECATED_MSG_ATTRIBUTE("use FBSDKLoginErrorUserCheckpointed instead"), |
|
127 |
FBSDKLoginUserMismatchErrorCode DEPRECATED_MSG_ATTRIBUTE("use FBSDKLoginErrorUserMismatch instead"), |
|
128 |
FBSDKLoginUnconfirmedUserErrorCode DEPRECATED_MSG_ATTRIBUTE("use FBSDKLoginErrorUnconfirmedUser instead"), |
|
129 |
FBSDKLoginSystemAccountAppDisabledErrorCode DEPRECATED_MSG_ATTRIBUTE("use FBSDKLoginErrorSystemAccountAppDisabled instead"), |
|
130 |
FBSDKLoginSystemAccountUnavailableErrorCode DEPRECATED_MSG_ATTRIBUTE("use FBSDKLoginErrorSystemAccountUnavailable instead"), |
|
131 |
FBSDKLoginBadChallengeString DEPRECATED_MSG_ATTRIBUTE("use FBSDKLoginErrorBadChallengeString instead"), |
|
132 |
} DEPRECATED_MSG_ATTRIBUTE("use FBSDKLoginError instead"); |
|
133 |
|
|
134 |
/** |
|
135 |
Deprecated |
|
136 |
*/ |
|
137 |
typedef NS_ENUM(NSUInteger, FBSDKDeviceLoginErrorSubcode) { |
|
138 |
FBSDKDeviceLoginExcessivePollingErrorSubcode DEPRECATED_MSG_ATTRIBUTE("use FBSDKDeviceLoginErrorExcessivePolling instead") = FBSDKDeviceLoginErrorExcessivePolling, |
|
139 |
FBSDKDeviceLoginAuthorizationDeclinedErrorSubcode DEPRECATED_MSG_ATTRIBUTE("use FBSDKDeviceLoginErrorAuthorizationDeclined instead") = FBSDKDeviceLoginErrorAuthorizationDeclined, |
|
140 |
FBSDKDeviceLoginAuthorizationPendingErrorSubcode DEPRECATED_MSG_ATTRIBUTE("use FBSDKDeviceLoginErrorAuthorizationPending instead") = FBSDKDeviceLoginErrorAuthorizationPending, |
|
141 |
FBSDKDeviceLoginCodeExpiredErrorSubcode DEPRECATED_MSG_ATTRIBUTE("use FBSDKDeviceLoginErrorCodeExpired instead") = FBSDKDeviceLoginErrorCodeExpired |
|
142 |
} DEPRECATED_MSG_ATTRIBUTE("use FBSDKDeviceLoginError instead"); |