FBNativeDialogs.h 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  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 <CoreLocation/CoreLocation.h>
  17. #import <UIKit/UIKit.h>
  18. #import "FBAppCall.h"
  19. #import "FBOpenGraphActionShareDialogParams.h"
  20. #import "FBShareDialogParams.h"
  21. @class FBSession;
  22. @protocol FBOpenGraphAction;
  23. // note that the following class and types are deprecated in favor of FBDialogs and its methods
  24. /*!
  25. @typedef FBNativeDialogResult enum
  26. @abstract
  27. Please note that this enum and its related methods have been deprecated, please migrate your
  28. code to use `FBOSIntegratedShareDialogResult` and its related methods.
  29. */
  30. typedef NS_ENUM(NSUInteger, FBNativeDialogResult) {
  31. /*! Indicates that the dialog action completed successfully. */
  32. FBNativeDialogResultSucceeded,
  33. /*! Indicates that the dialog action was cancelled (either by the user or the system). */
  34. FBNativeDialogResultCancelled,
  35. /*! Indicates that the dialog could not be shown (because not on ios6 or ios6 auth was not used). */
  36. FBNativeDialogResultError
  37. }
  38. __attribute__((deprecated));
  39. /*!
  40. @typedef
  41. @abstract
  42. Please note that `FBShareDialogHandler` and its related methods have been deprecated, please migrate your
  43. code to use `FBOSIntegratedShareDialogHandler` and its related methods.
  44. */
  45. typedef void (^FBShareDialogHandler)(FBNativeDialogResult result, NSError *error)
  46. __attribute__((deprecated));
  47. /*!
  48. @class FBNativeDialogs
  49. @abstract
  50. Please note that `FBNativeDialogs` has been deprecated, please migrate your
  51. code to use `FBDialogs`.
  52. */
  53. @interface FBNativeDialogs : NSObject
  54. /*!
  55. @abstract
  56. Please note that this method has been deprecated, please migrate your
  57. code to use `FBDialogs` and the related method `presentOSIntegratedShareDialogModallyFrom`.
  58. */
  59. + (BOOL)presentShareDialogModallyFrom:(UIViewController *)viewController
  60. initialText:(NSString *)initialText
  61. image:(UIImage *)image
  62. url:(NSURL *)url
  63. handler:(FBShareDialogHandler)handler
  64. __attribute__((deprecated));
  65. /*!
  66. @abstract
  67. Please note that this method has been deprecated, please migrate your
  68. code to use `FBDialogs` and the related method `presentOSIntegratedShareDialogModallyFrom`.
  69. */
  70. + (BOOL)presentShareDialogModallyFrom:(UIViewController *)viewController
  71. initialText:(NSString *)initialText
  72. images:(NSArray *)images
  73. urls:(NSArray *)urls
  74. handler:(FBShareDialogHandler)handler
  75. __attribute__((deprecated));
  76. /*!
  77. @abstract
  78. Please note that this method has been deprecated, please migrate your
  79. code to use `FBDialogs` and the related method `presentOSIntegratedShareDialogModallyFrom`.
  80. */
  81. + (BOOL)presentShareDialogModallyFrom:(UIViewController *)viewController
  82. session:(FBSession *)session
  83. initialText:(NSString *)initialText
  84. images:(NSArray *)images
  85. urls:(NSArray *)urls
  86. handler:(FBShareDialogHandler)handler
  87. __attribute__((deprecated));
  88. /*!
  89. @abstract
  90. Please note that this method has been deprecated, please migrate your
  91. code to use `FBDialogs` and the related method `canPresentOSIntegratedShareDialogWithSession`.
  92. */
  93. + (BOOL)canPresentShareDialogWithSession:(FBSession *)session __attribute__((deprecated));
  94. @end