FBOpenGraphObject.h 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  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 "FBGraphObject.h"
  18. /*!
  19. @protocol
  20. @abstract
  21. The `FBOpenGraphObject` protocol is the base protocol for use in posting and retrieving Open Graph objects.
  22. It inherits from the `FBGraphObject` protocol; you may derive custome protocols from `FBOpenGraphObject` in order
  23. implement typed access to your application's custom objects.
  24. @discussion
  25. Represents an Open Graph custom object, to be used directly, or from which to
  26. derive custom action protocols with custom properties.
  27. */
  28. @protocol FBOpenGraphObject<FBGraphObject>
  29. /*!
  30. @abstract use objectID instead
  31. @deprecated use objectID instead
  32. */
  33. @property (retain, nonatomic) NSString *id __attribute__ ((deprecated("use objectID instead")));
  34. /*!
  35. @property
  36. @abstract Typed access to the object's ID.
  37. @discussion Note this typically refers to the "id" field of the graph object (i.e., equivalent
  38. to `[self objectForKey:@"id"]`) but is differently named to avoid conflicting with Apple's
  39. non-public selectors.
  40. */
  41. @property (retain, nonatomic) NSString *objectID;
  42. /*!
  43. @property
  44. @abstract Typed access to the object's type, which is a string in the form mynamespace:mytype
  45. */
  46. @property (retain, nonatomic) NSString *type;
  47. /*!
  48. @property
  49. @abstract Typed access to object's title
  50. */
  51. @property (retain, nonatomic) NSString *title;
  52. /*!
  53. @property
  54. @abstract Typed access to the object's image property
  55. */
  56. @property (retain, nonatomic) id image;
  57. /*!
  58. @property
  59. @abstract Typed access to the object's url property
  60. */
  61. @property (retain, nonatomic) id url;
  62. /*!
  63. @abstract Typed access to the object's description property.
  64. @discussion Note this typically refers to the "description" field of the graph object (i.e., equivalent
  65. to `[self objectForKey:@"description"]`) but is differently named to avoid conflicting with Apple's
  66. non-public selectors.*/
  67. @property (retain, nonatomic) id objectDescription;
  68. /*!
  69. @property
  70. @abstract Typed access to action's data, which is a dictionary of custom properties
  71. */
  72. @property (retain, nonatomic) id<FBGraphObject> data;
  73. @end