FBOpenGraphActionParams.h 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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. #import "FBOpenGraphAction.h"
  19. #import "FBSDKMacros.h"
  20. FBSDK_EXTERN NSString *const FBPostObject;
  21. /*!
  22. @class FBOpenGraphActionParams
  23. @abstract
  24. This object is used to encapsulate state for parameters to an Open Graph share,
  25. typically used with the Native Share Dialog or Message Dialog.
  26. */
  27. @interface FBOpenGraphActionParams : FBDialogsParams
  28. /*! @abstract The Open Graph action to be published. */
  29. @property (nonatomic, retain) id<FBOpenGraphAction> action;
  30. /*! @abstract The name of the property representing the primary target of the Open
  31. Graph action, which will be displayed as a preview in the dialog. */
  32. @property (nonatomic, copy) NSString *previewPropertyName;
  33. /*! @abstract The fully qualified type of the Open Graph action. */
  34. @property (nonatomic, copy) NSString *actionType;
  35. /*!
  36. @abstract Designated initializer
  37. @param action The action object, typically a dictionary based object created
  38. from `[FBGraphObject openGraphActionForPost]`.
  39. @param actionType The open graph action type defined in your application settings.
  40. Typically, either a common open graph type like "books.reads", or a custom "<namespace>:<actiontype>".
  41. @param previewPropertyName The identifier for object in the open graph action. For example, for books.reads
  42. this would be "book".
  43. */
  44. - (instancetype)initWithAction:(id<FBOpenGraphAction>)action actionType:(NSString *)actionType previewPropertyName:(NSString *)previewPropertyName;
  45. @end