FBSDKAppInviteContent.h 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. // Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
  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. #import <Foundation/Foundation.h>
  19. #import <FBSDKCoreKit/FBSDKCopying.h>
  20. #import <FBSDKShareKit/FBSDKSharingValidation.h>
  21. /**
  22. NS_ENUM(NSUInteger, FBSDKAppInviteDestination)
  23. Specifies the privacy of a group.
  24. */
  25. typedef NS_ENUM(NSUInteger, FBSDKAppInviteDestination)
  26. {
  27. /** Deliver to Facebook. */
  28. FBSDKAppInviteDestinationFacebook = 0,
  29. /** Deliver to Messenger. */
  30. FBSDKAppInviteDestinationMessenger,
  31. };
  32. /**
  33. A model for app invite.
  34. */
  35. @interface FBSDKAppInviteContent : NSObject <FBSDKCopying, FBSDKSharingValidation, NSSecureCoding>
  36. /**
  37. A URL to a preview image that will be displayed with the app invite
  38. This is optional. If you don't include it a fallback image will be used.
  39. */
  40. @property (nonatomic, copy) NSURL *appInvitePreviewImageURL;
  41. /**
  42. An app link target that will be used as a target when the user accept the invite.
  43. This is a requirement.
  44. */
  45. @property (nonatomic, copy) NSURL *appLinkURL;
  46. /**
  47. @warning Use `appInvitePreviewImageURL` instead.
  48. */
  49. @property (nonatomic, copy) NSURL *previewImageURL
  50. DEPRECATED_MSG_ATTRIBUTE("use appInvitePreviewImageURL instead");
  51. /**
  52. Promotional code to be displayed while sending and receiving the invite.
  53. This is optional. This can be between 0 and 10 characters long and can contain
  54. alphanumeric characters only. To set a promo code, you need to set promo text.
  55. */
  56. @property (nonatomic, copy) NSString *promotionCode;
  57. /**
  58. Promotional text to be displayed while sending and receiving the invite.
  59. This is optional. This can be between 0 and 80 characters long and can contain
  60. alphanumeric and spaces only.
  61. */
  62. @property (nonatomic, copy) NSString *promotionText;
  63. /**
  64. Destination for the app invite.
  65. This is optional and for declaring destination of the invite.
  66. */
  67. @property FBSDKAppInviteDestination destination;
  68. /**
  69. Compares the receiver to another app invite content.
  70. @param content The other content
  71. @return YES if the receiver's values are equal to the other content's values; otherwise NO
  72. */
  73. - (BOOL)isEqualToAppInviteContent:(FBSDKAppInviteContent *)content;
  74. @end