FBSDKAppInviteContent.h 3.2 KB

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