FBLinkShareParams.h 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. /*
  2. * Copyright 2010-present Facebook.
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. #import <Foundation/Foundation.h>
  17. #import "FBDialogsParams.h"
  18. /*!
  19. @class FBLinkShareParams
  20. @abstract
  21. This object is used to encapsulate state for parameters to a share a link,
  22. typically with the Facebook Native Share Dialog or the Message Dialog.
  23. */
  24. @interface FBLinkShareParams : FBDialogsParams
  25. /*! @abstract The URL link to be attached to the post. Only "http" or "https"
  26. schemes are supported. */
  27. @property (nonatomic, copy) NSURL *link;
  28. /*! @abstract The name, or title associated with the link. Is only used if the
  29. link is non-nil. */
  30. @property (nonatomic, copy) NSString *name;
  31. /*! @abstract The caption to be used with the link. Is only used if the link is
  32. non-nil. */
  33. @property (nonatomic, copy) NSString *caption;
  34. /*! @abstract The description associated with the link. Is only used if the
  35. link is non-nil. */
  36. @property (nonatomic, copy) NSString *linkDescription;
  37. /*! @abstract The link to a thumbnail to associate with the post. Is only used
  38. if the link is non-nil. Only "http" or "https" schemes are supported. Note that this
  39. property should not be used to share photos; see the photos property. */
  40. @property (nonatomic, copy) NSURL *picture;
  41. /*! @abstract An array of NSStrings or FBGraphUsers to tag in the post.
  42. If using NSStrings, the values must represent the IDs of the users to tag. */
  43. @property (nonatomic, copy) NSArray *friends;
  44. /*! @abstract An NSString or FBGraphPlace to tag in the status update. If
  45. NSString, the value must be the ID of the place to tag. */
  46. @property (nonatomic, copy) id place;
  47. /*! @abstract A text reference for the category of the post, used on Facebook
  48. Insights. */
  49. @property (nonatomic, copy) NSString *ref;
  50. /*! @abstract If YES, treats any data failures (e.g. failures when getting
  51. data for IDs passed through "friends" or "place") as a fatal error, and will not
  52. continue with the status update. */
  53. @property (nonatomic, assign) BOOL dataFailuresFatal;
  54. /*!
  55. @abstract Designated initializer
  56. @param link the required link to share
  57. @param name the optional name to describe the share
  58. @param caption the optional caption to describe the share
  59. @param description the optional description to describe the share
  60. @param picture the optional url to use as the share's image
  61. */
  62. - (instancetype)initWithLink:(NSURL *)link
  63. name:(NSString *)name
  64. caption:(NSString *)caption
  65. description:(NSString *)description
  66. picture:(NSURL *)picture;
  67. @end