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