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 |
|
e81c27
|
21 |
NS_ASSUME_NONNULL_BEGIN |
H |
22 |
|
13e53a
|
23 |
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0 |
bad748
|
24 |
|
9febd9
|
25 |
/** |
13e53a
|
26 |
The error domain for all errors from FBSDKLoginKit |
9febd9
|
27 |
|
W |
28 |
Error codes from the SDK in the range 300-399 are reserved for this domain. |
bad748
|
29 |
*/ |
e81c27
|
30 |
FOUNDATION_EXPORT NSErrorDomain const FBSDKLoginErrorDomain |
H |
31 |
NS_SWIFT_NAME(LoginErrorDomain); |
13e53a
|
32 |
|
H |
33 |
#else |
bad748
|
34 |
|
9febd9
|
35 |
/** |
13e53a
|
36 |
The error domain for all errors from FBSDKLoginKit |
H |
37 |
|
|
38 |
Error codes from the SDK in the range 300-399 are reserved for this domain. |
|
39 |
*/ |
e81c27
|
40 |
FOUNDATION_EXPORT NSString *const FBSDKLoginErrorDomain |
H |
41 |
NS_SWIFT_NAME(LoginErrorDomain); |
13e53a
|
42 |
|
H |
43 |
#endif |
|
44 |
|
|
45 |
#ifndef NS_ERROR_ENUM |
|
46 |
#define NS_ERROR_ENUM(_domain, _name) \ |
|
47 |
enum _name: NSInteger _name; \ |
|
48 |
enum __attribute__((ns_error_domain(_domain))) _name: NSInteger |
|
49 |
#endif |
|
50 |
|
|
51 |
/** |
|
52 |
FBSDKLoginError |
9febd9
|
53 |
Error codes for FBSDKLoginErrorDomain. |
bad748
|
54 |
*/ |
13e53a
|
55 |
typedef NS_ERROR_ENUM(FBSDKLoginErrorDomain, FBSDKLoginError) |
bad748
|
56 |
{ |
9febd9
|
57 |
/** |
W |
58 |
Reserved. |
bad748
|
59 |
*/ |
13e53a
|
60 |
FBSDKLoginErrorReserved = 300, |
e81c27
|
61 |
|
9febd9
|
62 |
/** |
W |
63 |
The error code for unknown errors. |
bad748
|
64 |
*/ |
13e53a
|
65 |
FBSDKLoginErrorUnknown, |
bad748
|
66 |
|
9febd9
|
67 |
/** |
W |
68 |
The user's password has changed and must log in again |
bad748
|
69 |
*/ |
13e53a
|
70 |
FBSDKLoginErrorPasswordChanged, |
e81c27
|
71 |
|
9febd9
|
72 |
/** |
W |
73 |
The user must log in to their account on www.facebook.com to restore access |
bad748
|
74 |
*/ |
13e53a
|
75 |
FBSDKLoginErrorUserCheckpointed, |
e81c27
|
76 |
|
9febd9
|
77 |
/** |
W |
78 |
Indicates a failure to request new permissions because the user has changed. |
bad748
|
79 |
*/ |
13e53a
|
80 |
FBSDKLoginErrorUserMismatch, |
e81c27
|
81 |
|
9febd9
|
82 |
/** |
W |
83 |
The user must confirm their account with Facebook before logging in |
bad748
|
84 |
*/ |
13e53a
|
85 |
FBSDKLoginErrorUnconfirmedUser, |
bad748
|
86 |
|
9febd9
|
87 |
/** |
W |
88 |
The Accounts framework failed without returning an error, indicating the |
bad748
|
89 |
app's slider in the iOS Facebook Settings (device Settings -> Facebook -> App Name) has |
W |
90 |
been disabled. |
|
91 |
*/ |
13e53a
|
92 |
FBSDKLoginErrorSystemAccountAppDisabled, |
e81c27
|
93 |
|
9febd9
|
94 |
/** |
W |
95 |
An error occurred related to Facebook system Account store |
bad748
|
96 |
*/ |
13e53a
|
97 |
FBSDKLoginErrorSystemAccountUnavailable, |
e81c27
|
98 |
|
9febd9
|
99 |
/** |
W |
100 |
The login response was missing a valid challenge string. |
bad748
|
101 |
*/ |
13e53a
|
102 |
FBSDKLoginErrorBadChallengeString, |
e81c27
|
103 |
} NS_SWIFT_NAME(LoginError); |
9f077b
|
104 |
|
H |
105 |
/** |
13e53a
|
106 |
FBSDKDeviceLoginError |
9f077b
|
107 |
Error codes for FBSDKDeviceLoginErrorDomain. |
H |
108 |
*/ |
13e53a
|
109 |
typedef NS_ERROR_ENUM(FBSDKLoginErrorDomain, FBSDKDeviceLoginError) { |
9f077b
|
110 |
/** |
H |
111 |
Your device is polling too frequently. |
|
112 |
*/ |
13e53a
|
113 |
FBSDKDeviceLoginErrorExcessivePolling = 1349172, |
9f077b
|
114 |
/** |
H |
115 |
User has declined to authorize your application. |
|
116 |
*/ |
13e53a
|
117 |
FBSDKDeviceLoginErrorAuthorizationDeclined = 1349173, |
9f077b
|
118 |
/** |
H |
119 |
User has not yet authorized your application. Continue polling. |
|
120 |
*/ |
13e53a
|
121 |
FBSDKDeviceLoginErrorAuthorizationPending = 1349174, |
9f077b
|
122 |
/** |
H |
123 |
The code you entered has expired. |
|
124 |
*/ |
13e53a
|
125 |
FBSDKDeviceLoginErrorCodeExpired = 1349152 |
e81c27
|
126 |
} NS_SWIFT_NAME(DeviceLoginError); |
13e53a
|
127 |
|
e81c27
|
128 |
NS_ASSUME_NONNULL_END |