lpw
2022-02-15 2e29a3a585524a054640bb6e7bdf26fe77ba1f17
commit | author | age
2e29a3 1 /*
L 2  * Copyright (c) Meta Platforms, Inc. and affiliates.
3  * All rights reserved.
4  *
5  * This source code is licensed under the license found in the
6  * LICENSE file in the root directory of this source tree.
7  */
8
9 #if !TARGET_OS_TV
10
11 #import <Foundation/Foundation.h>
12
13 #import <FBSDKShareKit/FBSDKShareConstants.h>
14 #import <FBSDKShareKit/FBSDKSharing.h>
15
16 NS_ASSUME_NONNULL_BEGIN
17
18 /**
19  A dialog for sharing content through Messenger.
20
21  SUPPORTED SHARE TYPES
22  - FBSDKShareLinkContent
23
24  UNSUPPORTED SHARE TYPES (DEPRECATED AUGUST 2018)
25  - FBSDKShareOpenGraphContent
26  - FBSDKSharePhotoContent
27  - FBSDKShareVideoContent
28  - FBSDKShareMessengerOpenGraphMusicTemplateContent
29  - FBSDKShareMessengerMediaTemplateContent
30  - FBSDKShareMessengerGenericTemplateContent
31  - Any other types that are not one of the four supported types listed above
32  */
33 NS_SWIFT_NAME(MessageDialog)
34 @interface FBSDKMessageDialog : NSObject <FBSDKSharingDialog>
35
36 /**
37  Convenience initializer to return a Message Share Dialog with content and a delegate.
38  @param content The content to be shared.
39  @param delegate The receiver's delegate.
40  */
41 - (instancetype)initWithContent:(nullable id<FBSDKSharingContent>)content
42                        delegate:(nullable id<FBSDKSharingDelegate>)delegate;
43
44 /**
45  Convenience method to return a Message Share Dialog with content and a delegate.
46  @param content The content to be shared.
47  @param delegate The receiver's delegate.
48  */
49 + (instancetype)dialogWithContent:(nullable id<FBSDKSharingContent>)content
50                          delegate:(nullable id<FBSDKSharingDelegate>)delegate
51   NS_SWIFT_UNAVAILABLE("Use init(content:delegate:) instead");
52
53 /**
54  Convenience method to show a Message Share Dialog with content and a delegate.
55  @param content The content to be shared.
56  @param delegate The receiver's delegate.
57  */
58 + (instancetype)showWithContent:(nullable id<FBSDKSharingContent>)content
59                        delegate:(nullable id<FBSDKSharingDelegate>)delegate
60   NS_SWIFT_UNAVAILABLE("Use init(content:delegate:).show() instead");
61
62 @end
63
64 NS_ASSUME_NONNULL_END
65
66 #endif