@ohos-ports/react-native-fbsdk-next 13.4.3-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (284) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +943 -0
  3. package/android/build.gradle +57 -0
  4. package/android/src/main/AndroidManifest.xml +46 -0
  5. package/android/src/main/java/com/facebook/reactnative/androidsdk/FBAccessTokenModule.java +151 -0
  6. package/android/src/main/java/com/facebook/reactnative/androidsdk/FBActivityEventListener.java +40 -0
  7. package/android/src/main/java/com/facebook/reactnative/androidsdk/FBAppEventsLoggerModule.java +414 -0
  8. package/android/src/main/java/com/facebook/reactnative/androidsdk/FBAppLinkModule.java +86 -0
  9. package/android/src/main/java/com/facebook/reactnative/androidsdk/FBGameRequestDialogModule.java +94 -0
  10. package/android/src/main/java/com/facebook/reactnative/androidsdk/FBGraphRequestModule.java +283 -0
  11. package/android/src/main/java/com/facebook/reactnative/androidsdk/FBLoginButtonManager.java +83 -0
  12. package/android/src/main/java/com/facebook/reactnative/androidsdk/FBLoginManagerModule.java +171 -0
  13. package/android/src/main/java/com/facebook/reactnative/androidsdk/FBMessageDialogModule.java +111 -0
  14. package/android/src/main/java/com/facebook/reactnative/androidsdk/FBProfileModule.java +68 -0
  15. package/android/src/main/java/com/facebook/reactnative/androidsdk/FBSDKCallbackManagerBaseJavaModule.java +41 -0
  16. package/android/src/main/java/com/facebook/reactnative/androidsdk/FBSDKPackage.java +60 -0
  17. package/android/src/main/java/com/facebook/reactnative/androidsdk/FBSendButtonManager.java +51 -0
  18. package/android/src/main/java/com/facebook/reactnative/androidsdk/FBSettingsModule.java +95 -0
  19. package/android/src/main/java/com/facebook/reactnative/androidsdk/FBShareButtonManager.java +53 -0
  20. package/android/src/main/java/com/facebook/reactnative/androidsdk/FBShareDialogModule.java +107 -0
  21. package/android/src/main/java/com/facebook/reactnative/androidsdk/RCTLoginButton.java +126 -0
  22. package/android/src/main/java/com/facebook/reactnative/androidsdk/RCTLoginButtonEvent.java +27 -0
  23. package/android/src/main/java/com/facebook/reactnative/androidsdk/ReactNativeFacebookSDKCallback.java +58 -0
  24. package/android/src/main/java/com/facebook/reactnative/androidsdk/Utility.java +283 -0
  25. package/app.plugin.js +1 -0
  26. package/expo-module.config.json +10 -0
  27. package/ios/ExpoAdapterFBSDKNext/FacebookAppDelegate.swift +21 -0
  28. package/ios/ExpoAdapterFBSDKNext.podspec +33 -0
  29. package/ios/RCTFBSDK/core/RCTConvert+FBSDKAccessToken.h +27 -0
  30. package/ios/RCTFBSDK/core/RCTConvert+FBSDKAccessToken.m +41 -0
  31. package/ios/RCTFBSDK/core/RCTFBSDKAEMReporter.m +30 -0
  32. package/ios/RCTFBSDK/core/RCTFBSDKAccessToken.h +24 -0
  33. package/ios/RCTFBSDK/core/RCTFBSDKAccessToken.m +115 -0
  34. package/ios/RCTFBSDK/core/RCTFBSDKAppEvents.h +24 -0
  35. package/ios/RCTFBSDK/core/RCTFBSDKAppEvents.m +251 -0
  36. package/ios/RCTFBSDK/core/RCTFBSDKAppLink.h +24 -0
  37. package/ios/RCTFBSDK/core/RCTFBSDKAppLink.m +52 -0
  38. package/ios/RCTFBSDK/core/RCTFBSDKAuthenticationToken.h +6 -0
  39. package/ios/RCTFBSDK/core/RCTFBSDKAuthenticationToken.m +35 -0
  40. package/ios/RCTFBSDK/core/RCTFBSDKGraphRequestConnectionContainer.h +50 -0
  41. package/ios/RCTFBSDK/core/RCTFBSDKGraphRequestConnectionContainer.m +124 -0
  42. package/ios/RCTFBSDK/core/RCTFBSDKGraphRequestManager.h +25 -0
  43. package/ios/RCTFBSDK/core/RCTFBSDKGraphRequestManager.m +43 -0
  44. package/ios/RCTFBSDK/core/RCTFBSDKProfile.h +6 -0
  45. package/ios/RCTFBSDK/core/RCTFBSDKProfile.m +58 -0
  46. package/ios/RCTFBSDK/core/RCTFBSDKSettings.h +14 -0
  47. package/ios/RCTFBSDK/core/RCTFBSDKSettings.m +80 -0
  48. package/ios/RCTFBSDK/login/RCTConvert+FBSDKLogin.h +28 -0
  49. package/ios/RCTFBSDK/login/RCTConvert+FBSDKLogin.m +35 -0
  50. package/ios/RCTFBSDK/login/RCTFBSDKLoginButtonManager.h +25 -0
  51. package/ios/RCTFBSDK/login/RCTFBSDKLoginButtonManager.m +73 -0
  52. package/ios/RCTFBSDK/login/RCTFBSDKLoginButtonView.h +12 -0
  53. package/ios/RCTFBSDK/login/RCTFBSDKLoginButtonView.m +57 -0
  54. package/ios/RCTFBSDK/login/RCTFBSDKLoginManager.h +22 -0
  55. package/ios/RCTFBSDK/login/RCTFBSDKLoginManager.m +154 -0
  56. package/ios/RCTFBSDK/share/RCTConvert+FBSDKSharingContent.h +29 -0
  57. package/ios/RCTFBSDK/share/RCTConvert+FBSDKSharingContent.m +111 -0
  58. package/ios/RCTFBSDK/share/RCTFBSDKGameRequestDialog.h +24 -0
  59. package/ios/RCTFBSDK/share/RCTFBSDKGameRequestDialog.m +134 -0
  60. package/ios/RCTFBSDK/share/RCTFBSDKMessageDialog.h +24 -0
  61. package/ios/RCTFBSDK/share/RCTFBSDKMessageDialog.m +116 -0
  62. package/ios/RCTFBSDK/share/RCTFBSDKSendButtonManager.h +25 -0
  63. package/ios/RCTFBSDK/share/RCTFBSDKSendButtonManager.m +39 -0
  64. package/ios/RCTFBSDK/share/RCTFBSDKShareButtonManager.h +23 -0
  65. package/ios/RCTFBSDK/share/RCTFBSDKShareButtonManager.m +39 -0
  66. package/ios/RCTFBSDK/share/RCTFBSDKShareDialog.h +24 -0
  67. package/ios/RCTFBSDK/share/RCTFBSDKShareDialog.m +134 -0
  68. package/ios/RCTFBSDK/share/RCTFBSDKShareHelper.h +21 -0
  69. package/ios/RCTFBSDK/share/RCTFBSDKShareHelper.m +32 -0
  70. package/ios/RCTFBSDK.xcodeproj/project.pbxproj +446 -0
  71. package/ios/RCTFBSDK.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
  72. package/ios/RCTFBSDK.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
  73. package/jest/mocks/index.js +81 -0
  74. package/jest/setup.js +3 -0
  75. package/lib/commonjs/FBAEMReporter.js +39 -0
  76. package/lib/commonjs/FBAEMReporter.js.map +1 -0
  77. package/lib/commonjs/FBAccessToken.js +198 -0
  78. package/lib/commonjs/FBAccessToken.js.map +1 -0
  79. package/lib/commonjs/FBAppEventsLogger.js +221 -0
  80. package/lib/commonjs/FBAppEventsLogger.js.map +1 -0
  81. package/lib/commonjs/FBAppLink.js +36 -0
  82. package/lib/commonjs/FBAppLink.js.map +1 -0
  83. package/lib/commonjs/FBAuthenticationToken.js +55 -0
  84. package/lib/commonjs/FBAuthenticationToken.js.map +1 -0
  85. package/lib/commonjs/FBGameRequestDialog.js +45 -0
  86. package/lib/commonjs/FBGameRequestDialog.js.map +1 -0
  87. package/lib/commonjs/FBGraphRequest.js +66 -0
  88. package/lib/commonjs/FBGraphRequest.js.map +1 -0
  89. package/lib/commonjs/FBGraphRequestManager.js +96 -0
  90. package/lib/commonjs/FBGraphRequestManager.js.map +1 -0
  91. package/lib/commonjs/FBLoginButton.js +67 -0
  92. package/lib/commonjs/FBLoginButton.js.map +1 -0
  93. package/lib/commonjs/FBLoginManager.js +102 -0
  94. package/lib/commonjs/FBLoginManager.js.map +1 -0
  95. package/lib/commonjs/FBMessageDialog.js +51 -0
  96. package/lib/commonjs/FBMessageDialog.js.map +1 -0
  97. package/lib/commonjs/FBProfile.js +134 -0
  98. package/lib/commonjs/FBProfile.js.map +1 -0
  99. package/lib/commonjs/FBSendButton.js +48 -0
  100. package/lib/commonjs/FBSendButton.js.map +1 -0
  101. package/lib/commonjs/FBSettings.js +115 -0
  102. package/lib/commonjs/FBSettings.js.map +1 -0
  103. package/lib/commonjs/FBShareButton.js +48 -0
  104. package/lib/commonjs/FBShareButton.js.map +1 -0
  105. package/lib/commonjs/FBShareDialog.js +57 -0
  106. package/lib/commonjs/FBShareDialog.js.map +1 -0
  107. package/lib/commonjs/index.js +323 -0
  108. package/lib/commonjs/index.js.map +1 -0
  109. package/lib/commonjs/models/FBAppGroupCreationContent.js +2 -0
  110. package/lib/commonjs/models/FBAppGroupCreationContent.js.map +1 -0
  111. package/lib/commonjs/models/FBGameRequestContent.js +2 -0
  112. package/lib/commonjs/models/FBGameRequestContent.js.map +1 -0
  113. package/lib/commonjs/models/FBSDKCallback.js +2 -0
  114. package/lib/commonjs/models/FBSDKCallback.js.map +1 -0
  115. package/lib/commonjs/models/FBShareContent.js +6 -0
  116. package/lib/commonjs/models/FBShareContent.js.map +1 -0
  117. package/lib/commonjs/models/FBShareLinkContent.js +6 -0
  118. package/lib/commonjs/models/FBShareLinkContent.js.map +1 -0
  119. package/lib/commonjs/models/FBSharePhoto.js +2 -0
  120. package/lib/commonjs/models/FBSharePhoto.js.map +1 -0
  121. package/lib/commonjs/models/FBSharePhotoContent.js +6 -0
  122. package/lib/commonjs/models/FBSharePhotoContent.js.map +1 -0
  123. package/lib/commonjs/models/FBShareVideo.js +2 -0
  124. package/lib/commonjs/models/FBShareVideo.js.map +1 -0
  125. package/lib/commonjs/models/FBShareVideoContent.js +6 -0
  126. package/lib/commonjs/models/FBShareVideoContent.js.map +1 -0
  127. package/lib/commonjs/util/validate.js +180 -0
  128. package/lib/commonjs/util/validate.js.map +1 -0
  129. package/lib/commonjs/utils/index.js +2 -0
  130. package/lib/commonjs/utils/index.js.map +1 -0
  131. package/lib/module/FBAEMReporter.js +34 -0
  132. package/lib/module/FBAEMReporter.js.map +1 -0
  133. package/lib/module/FBAccessToken.js +191 -0
  134. package/lib/module/FBAccessToken.js.map +1 -0
  135. package/lib/module/FBAppEventsLogger.js +215 -0
  136. package/lib/module/FBAppEventsLogger.js.map +1 -0
  137. package/lib/module/FBAppLink.js +29 -0
  138. package/lib/module/FBAppLink.js.map +1 -0
  139. package/lib/module/FBAuthenticationToken.js +48 -0
  140. package/lib/module/FBAuthenticationToken.js.map +1 -0
  141. package/lib/module/FBGameRequestDialog.js +39 -0
  142. package/lib/module/FBGameRequestDialog.js.map +1 -0
  143. package/lib/module/FBGraphRequest.js +60 -0
  144. package/lib/module/FBGraphRequest.js.map +1 -0
  145. package/lib/module/FBGraphRequestManager.js +90 -0
  146. package/lib/module/FBGraphRequestManager.js.map +1 -0
  147. package/lib/module/FBLoginButton.js +62 -0
  148. package/lib/module/FBLoginButton.js.map +1 -0
  149. package/lib/module/FBLoginManager.js +97 -0
  150. package/lib/module/FBLoginManager.js.map +1 -0
  151. package/lib/module/FBMessageDialog.js +45 -0
  152. package/lib/module/FBMessageDialog.js.map +1 -0
  153. package/lib/module/FBProfile.js +127 -0
  154. package/lib/module/FBProfile.js.map +1 -0
  155. package/lib/module/FBSendButton.js +41 -0
  156. package/lib/module/FBSendButton.js.map +1 -0
  157. package/lib/module/FBSettings.js +108 -0
  158. package/lib/module/FBSettings.js.map +1 -0
  159. package/lib/module/FBShareButton.js +41 -0
  160. package/lib/module/FBShareButton.js.map +1 -0
  161. package/lib/module/FBShareDialog.js +51 -0
  162. package/lib/module/FBShareDialog.js.map +1 -0
  163. package/lib/module/index.js +44 -0
  164. package/lib/module/index.js.map +1 -0
  165. package/lib/module/models/FBAppGroupCreationContent.js +2 -0
  166. package/lib/module/models/FBAppGroupCreationContent.js.map +1 -0
  167. package/lib/module/models/FBGameRequestContent.js +2 -0
  168. package/lib/module/models/FBGameRequestContent.js.map +1 -0
  169. package/lib/module/models/FBSDKCallback.js +2 -0
  170. package/lib/module/models/FBSDKCallback.js.map +1 -0
  171. package/lib/module/models/FBShareContent.js +2 -0
  172. package/lib/module/models/FBShareContent.js.map +1 -0
  173. package/lib/module/models/FBShareLinkContent.js +2 -0
  174. package/lib/module/models/FBShareLinkContent.js.map +1 -0
  175. package/lib/module/models/FBSharePhoto.js +2 -0
  176. package/lib/module/models/FBSharePhoto.js.map +1 -0
  177. package/lib/module/models/FBSharePhotoContent.js +2 -0
  178. package/lib/module/models/FBSharePhotoContent.js.map +1 -0
  179. package/lib/module/models/FBShareVideo.js +2 -0
  180. package/lib/module/models/FBShareVideo.js.map +1 -0
  181. package/lib/module/models/FBShareVideoContent.js +2 -0
  182. package/lib/module/models/FBShareVideoContent.js.map +1 -0
  183. package/lib/module/util/validate.js +157 -0
  184. package/lib/module/util/validate.js.map +1 -0
  185. package/lib/module/utils/index.js +2 -0
  186. package/lib/module/utils/index.js.map +1 -0
  187. package/lib/typescript/FBAEMReporter.d.ts +21 -0
  188. package/lib/typescript/FBAEMReporter.d.ts.map +1 -0
  189. package/lib/typescript/FBAccessToken.d.ts +118 -0
  190. package/lib/typescript/FBAccessToken.d.ts.map +1 -0
  191. package/lib/typescript/FBAppEventsLogger.d.ts +201 -0
  192. package/lib/typescript/FBAppEventsLogger.d.ts.map +1 -0
  193. package/lib/typescript/FBAppLink.d.ts +5 -0
  194. package/lib/typescript/FBAppLink.d.ts.map +1 -0
  195. package/lib/typescript/FBAuthenticationToken.d.ts +29 -0
  196. package/lib/typescript/FBAuthenticationToken.d.ts.map +1 -0
  197. package/lib/typescript/FBGameRequestDialog.d.ts +39 -0
  198. package/lib/typescript/FBGameRequestDialog.d.ts.map +1 -0
  199. package/lib/typescript/FBGraphRequest.d.ts +70 -0
  200. package/lib/typescript/FBGraphRequest.d.ts.map +1 -0
  201. package/lib/typescript/FBGraphRequestManager.d.ts +51 -0
  202. package/lib/typescript/FBGraphRequestManager.d.ts.map +1 -0
  203. package/lib/typescript/FBLoginButton.d.ts +92 -0
  204. package/lib/typescript/FBLoginButton.d.ts.map +1 -0
  205. package/lib/typescript/FBLoginManager.d.ts +77 -0
  206. package/lib/typescript/FBLoginManager.d.ts.map +1 -0
  207. package/lib/typescript/FBMessageDialog.d.ts +42 -0
  208. package/lib/typescript/FBMessageDialog.d.ts.map +1 -0
  209. package/lib/typescript/FBProfile.d.ts +127 -0
  210. package/lib/typescript/FBProfile.d.ts.map +1 -0
  211. package/lib/typescript/FBSendButton.d.ts +42 -0
  212. package/lib/typescript/FBSendButton.d.ts.map +1 -0
  213. package/lib/typescript/FBSettings.d.ts +49 -0
  214. package/lib/typescript/FBSettings.d.ts.map +1 -0
  215. package/lib/typescript/FBShareButton.d.ts +42 -0
  216. package/lib/typescript/FBShareButton.d.ts.map +1 -0
  217. package/lib/typescript/FBShareDialog.d.ts +69 -0
  218. package/lib/typescript/FBShareDialog.d.ts.map +1 -0
  219. package/lib/typescript/index.d.ts +43 -0
  220. package/lib/typescript/index.d.ts.map +1 -0
  221. package/lib/typescript/models/FBAppGroupCreationContent.d.ts +43 -0
  222. package/lib/typescript/models/FBAppGroupCreationContent.d.ts.map +1 -0
  223. package/lib/typescript/models/FBGameRequestContent.d.ts +63 -0
  224. package/lib/typescript/models/FBGameRequestContent.d.ts.map +1 -0
  225. package/lib/typescript/models/FBSDKCallback.d.ts +4 -0
  226. package/lib/typescript/models/FBSDKCallback.d.ts.map +1 -0
  227. package/lib/typescript/models/FBShareContent.d.ts +48 -0
  228. package/lib/typescript/models/FBShareContent.d.ts.map +1 -0
  229. package/lib/typescript/models/FBShareLinkContent.d.ts +65 -0
  230. package/lib/typescript/models/FBShareLinkContent.d.ts.map +1 -0
  231. package/lib/typescript/models/FBSharePhoto.d.ts +43 -0
  232. package/lib/typescript/models/FBSharePhoto.d.ts.map +1 -0
  233. package/lib/typescript/models/FBSharePhotoContent.d.ts +45 -0
  234. package/lib/typescript/models/FBSharePhotoContent.d.ts.map +1 -0
  235. package/lib/typescript/models/FBShareVideo.d.ts +31 -0
  236. package/lib/typescript/models/FBShareVideo.d.ts.map +1 -0
  237. package/lib/typescript/models/FBShareVideoContent.d.ts +58 -0
  238. package/lib/typescript/models/FBShareVideoContent.d.ts.map +1 -0
  239. package/lib/typescript/util/validate.d.ts +62 -0
  240. package/lib/typescript/util/validate.d.ts.map +1 -0
  241. package/lib/typescript/utils/index.d.ts +2 -0
  242. package/lib/typescript/utils/index.d.ts.map +1 -0
  243. package/package.json +155 -0
  244. package/plugin/build/config.d.ts +53 -0
  245. package/plugin/build/config.js +46 -0
  246. package/plugin/build/withFacebook.d.ts +4 -0
  247. package/plugin/build/withFacebook.js +59 -0
  248. package/plugin/build/withFacebookAndroid.d.ts +6 -0
  249. package/plugin/build/withFacebookAndroid.js +197 -0
  250. package/plugin/build/withFacebookIOS.d.ts +15 -0
  251. package/plugin/build/withFacebookIOS.js +163 -0
  252. package/plugin/build/withSKAdNetworkIdentifiers.d.ts +9 -0
  253. package/plugin/build/withSKAdNetworkIdentifiers.js +36 -0
  254. package/plugin/tsconfig.json +9 -0
  255. package/react-native-fbsdk-next.podspec +34 -0
  256. package/src/FBAEMReporter.ts +44 -0
  257. package/src/FBAccessToken.ts +222 -0
  258. package/src/FBAppEventsLogger.ts +375 -0
  259. package/src/FBAppLink.ts +30 -0
  260. package/src/FBAuthenticationToken.ts +61 -0
  261. package/src/FBGameRequestDialog.ts +49 -0
  262. package/src/FBGraphRequest.ts +89 -0
  263. package/src/FBGraphRequestManager.ts +117 -0
  264. package/src/FBLoginButton.tsx +152 -0
  265. package/src/FBLoginManager.ts +133 -0
  266. package/src/FBMessageDialog.ts +53 -0
  267. package/src/FBProfile.ts +166 -0
  268. package/src/FBSendButton.tsx +61 -0
  269. package/src/FBSettings.ts +122 -0
  270. package/src/FBShareButton.tsx +61 -0
  271. package/src/FBShareDialog.ts +96 -0
  272. package/src/index.ts +85 -0
  273. package/src/models/FBAppGroupCreationContent.ts +48 -0
  274. package/src/models/FBGameRequestContent.ts +81 -0
  275. package/src/models/FBSDKCallback.ts +3 -0
  276. package/src/models/FBShareContent.ts +54 -0
  277. package/src/models/FBShareLinkContent.ts +71 -0
  278. package/src/models/FBSharePhoto.ts +45 -0
  279. package/src/models/FBSharePhotoContent.ts +48 -0
  280. package/src/models/FBShareVideo.ts +31 -0
  281. package/src/models/FBShareVideoContent.ts +64 -0
  282. package/src/util/validate.ts +167 -0
  283. package/src/utils/index.ts +1 -0
  284. package/tsconfig.json +103 -0
@@ -0,0 +1,118 @@
1
+ export type AccessTokenMap = {
2
+ accessToken: string;
3
+ permissions: Array<string>;
4
+ declinedPermissions: Array<string>;
5
+ expiredPermissions: Array<string>;
6
+ applicationID: string;
7
+ userID: string;
8
+ expirationTime: number;
9
+ lastRefreshTime: number;
10
+ dataAccessExpirationTime: number;
11
+ accessTokenSource?: string;
12
+ };
13
+ /**
14
+ * Represents an immutable access token for using Facebook services.
15
+ */
16
+ declare class FBAccessToken {
17
+ /**
18
+ * The access token string.
19
+ */
20
+ accessToken: string;
21
+ /**
22
+ * The known granted permissions.
23
+ */
24
+ permissions: Array<string>;
25
+ /**
26
+ * The known declined permissions.
27
+ */
28
+ declinedPermissions: Array<string>;
29
+ /**
30
+ * The known expired permissions.
31
+ */
32
+ expiredPermissions: Array<string>;
33
+ /**
34
+ * The app ID.
35
+ */
36
+ applicationID: string;
37
+ /**
38
+ * The user ID.
39
+ */
40
+ userID: string;
41
+ /**
42
+ * The expiration time of the access token.
43
+ * The value is the number of milliseconds since Jan. 1, 1970, midnight GMT.
44
+ */
45
+ expirationTime: number;
46
+ /**
47
+ * The last refresh time of the access token.
48
+ * The value is the number of milliseconds since Jan. 1, 1970, midnight GMT.
49
+ */
50
+ lastRefreshTime: number;
51
+ /**
52
+ * The data access expiration time of the access token.
53
+ * The value is the number of milliseconds since Jan. 1, 1970, midnight GMT.
54
+ */
55
+ dataAccessExpirationTime: number;
56
+ /**
57
+ * The source of access token.
58
+ * @platform android
59
+ */
60
+ accessTokenSource?: string;
61
+ constructor(tokenMap: AccessTokenMap);
62
+ /**
63
+ * Getter for the access token that is current for the application.
64
+ */
65
+ static getCurrentAccessToken(): Promise<FBAccessToken | null>;
66
+ /**
67
+ * Setter for the access token that is current for the application.
68
+ */
69
+ static setCurrentAccessToken(accessToken: AccessTokenMap): void;
70
+ /**
71
+ * Updates the current access token with up to date permissions,
72
+ * and extends the expiration date, if extension is possible.
73
+ */
74
+ static refreshCurrentAccessTokenAsync(): Promise<AccessTokenMap>;
75
+ /**
76
+ * Adds a listener for when the access token changes. Returns a functions which removes the
77
+ * listener when called.
78
+ */
79
+ static addListener(listener: (accessToken: FBAccessToken | null) => void): () => any;
80
+ /**
81
+ * Gets the date at which the access token expires. The value is the number of
82
+ * milliseconds since Jan. 1, 1970, midnight GMT.
83
+ */
84
+ getExpires(): number;
85
+ /**
86
+ * Get the list of permissions associated with this access token. Note that the most up-to-date
87
+ * list of permissions is maintained by Facebook, so this list may be outdated if permissions
88
+ * have been added or removed since the time the AccessToken object was created. See
89
+ * https://developers.facebook.com/docs/reference/login/#permissions for details.
90
+ */
91
+ getPermissions(): string[];
92
+ /**
93
+ * Gets the list of permissions declined by the user with this access token. It represents the
94
+ * entire set of permissions that have been requested and declined. Note that the most
95
+ * up-to-date list of permissions is maintained by Facebook, so this list may be outdated if
96
+ * permissions have been granted or declined since the last time an AccessToken object was
97
+ * created. See https://developers.facebook.com/docs/reference/login/#permissions for details.
98
+ */
99
+ getDeclinedPermissions(): string[];
100
+ getExpiredPermissions(): string[];
101
+ /**
102
+ * Gets the date at which the token was last refreshed. Since tokens expire, the Facebook SDK
103
+ * will attempt to renew them periodically. The value is the number of milliseconds since
104
+ * Jan. 1, 1970, midnight GMT.
105
+ */
106
+ getLastRefresh(): number;
107
+ getDataAccessExpiration(): number;
108
+ /**
109
+ * Gets the ID of the Facebook Application associated with this access token.
110
+ */
111
+ getApplicationId(): string;
112
+ /**
113
+ * Gets user ID associated with this access token.
114
+ */
115
+ getUserId(): string;
116
+ }
117
+ export default FBAccessToken;
118
+ //# sourceMappingURL=FBAccessToken.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FBAccessToken.d.ts","sourceRoot":"","sources":["../../src/FBAccessToken.ts"],"names":[],"mappings":"AA2BA,MAAM,MAAM,cAAc,GAAG;IAC3B,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC3B,mBAAmB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACnC,kBAAkB,EAAE,KAAK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gB;IAIhB;;OAEG;IACH,SAAS;CAGV;AAED,eAAe,aAAa,CAAC"}
@@ -0,0 +1,201 @@
1
+ /**
2
+ * Controls when an AppEventsLogger sends log events to the server
3
+ */
4
+ export type AppEventsFlushBehavior =
5
+ /**
6
+ * Flush automatically: periodically (every 15 seconds or after every 100 events), and
7
+ * always at app reactivation. This is the default value.
8
+ */
9
+ 'auto'
10
+ /**
11
+ * Only flush when AppEventsLogger.flush() is explicitly invoked.
12
+ */
13
+ | 'explicit_only';
14
+ /**
15
+ * Specifies product availability for Product Catalog product item update
16
+ */
17
+ export type ProductAvailability =
18
+ /**
19
+ * Item ships immediately
20
+ */
21
+ 'in_stock'
22
+ /**
23
+ * No plan to restock
24
+ */
25
+ | 'out_of_stock'
26
+ /**
27
+ * Available in future
28
+ */
29
+ | 'preorder'
30
+ /**
31
+ * Ships in 1-2 weeks
32
+ */
33
+ | 'avaliable_for_order'
34
+ /**
35
+ * Discontinued
36
+ */
37
+ | 'discontinued';
38
+ /**
39
+ * Specifies product condition for Product Catalog product item update
40
+ */
41
+ export type ProductCondition = 'new' | 'refurbished' | 'used';
42
+ export type Params = {
43
+ [key: string]: string | number;
44
+ };
45
+ /**
46
+ * Info about a user to increase chances of matching a Facebook user.
47
+ * See https://developers.facebook.com/docs/app-events/advanced-matching for
48
+ * more info about the expected format of each field.
49
+ */
50
+ export type UserData = Readonly<{
51
+ email?: string;
52
+ firstName?: string;
53
+ lastName?: string;
54
+ phone?: string;
55
+ dateOfBirth?: string;
56
+ gender?: 'm' | 'f';
57
+ city?: string;
58
+ state?: string;
59
+ zip?: string;
60
+ country?: string;
61
+ }>;
62
+ export type AppEvent = {
63
+ AchievedLevel: string;
64
+ AdClick: string;
65
+ AdImpression: string;
66
+ AddedPaymentInfo: string;
67
+ AddedToCart: string;
68
+ AddedToWishlist: string;
69
+ CompletedRegistration: string;
70
+ CompletedTutorial: string;
71
+ Contact: string;
72
+ CustomizeProduct: string;
73
+ Donate: string;
74
+ FindLocation: string;
75
+ InitiatedCheckout: string;
76
+ Purchased: string;
77
+ Rated: string;
78
+ Searched: string;
79
+ SpentCredits: string;
80
+ Schedule: string;
81
+ StartTrial: string;
82
+ SubmitApplication: string;
83
+ Subscribe: string;
84
+ UnlockedAchievement: string;
85
+ ViewedContent: string;
86
+ };
87
+ export type AppEventParam = {
88
+ AddType: string;
89
+ Content: string;
90
+ ContentID: string;
91
+ ContentType: string;
92
+ Currency: string;
93
+ Description: string;
94
+ Level: string;
95
+ NumItems: string;
96
+ MaxRatingValue: string;
97
+ OrderId: string;
98
+ PaymentInfoAvailable: string;
99
+ RegistrationMethod: string;
100
+ SearchString: string;
101
+ Success: string;
102
+ ValueNo: string;
103
+ ValueYes: string;
104
+ };
105
+ declare const _default: {
106
+ /**
107
+ * Sets the current event flushing behavior specifying when events
108
+ * are sent back to Facebook servers.
109
+ */
110
+ setFlushBehavior(flushBehavior: AppEventsFlushBehavior): void;
111
+ /**
112
+ * Logs an event with eventName and optional arguments.
113
+ * This function supports the following usage:
114
+ * logEvent(eventName: string);
115
+ * logEvent(eventName: string, valueToSum: number);
116
+ * logEvent(eventName: string, parameters: {[key:string]:string|number});
117
+ * logEvent(eventName: string, valueToSum: number, parameters: {[key:string]:string|number});
118
+ * See https://developers.facebook.com/docs/app-events/android for detail.
119
+ */
120
+ logEvent(eventName: string, ...args: Array<number | Params>): void;
121
+ /**
122
+ * Logs a purchase. See http://en.wikipedia.org/wiki/ISO_4217 for currencyCode.
123
+ */
124
+ logPurchase(purchaseAmount: number, currencyCode: string, parameters?: Params): void;
125
+ /**
126
+ * Logs an app event that tracks that the application was open via Push Notification.
127
+ */
128
+ logPushNotificationOpen(payload?: Record<string, string | number>): void;
129
+ /**
130
+ * Uploads product catalog product item as an app event
131
+ * @param itemID – Unique ID for the item. Can be a variant for a product. Max size is 100.
132
+ * @param availability – If item is in stock. Accepted values are: in stock - Item ships immediately out of stock - No plan to restock preorder - Available in future available for order - Ships in 1-2 weeks discontinued - Discontinued
133
+ * @param condition – Product condition: new, refurbished or used.
134
+ * @param description – Short text describing product. Max size is 5000.
135
+ * @param imageLink – Link to item image used in ad.
136
+ * @param link – Link to merchant's site where someone can buy the item.
137
+ * @param title – Title of item.
138
+ * @param priceAmount – Amount of purchase, in the currency specified by the 'currency' parameter. This value will be rounded to the thousandths place (e.g., 12.34567 becomes 12.346).
139
+ * @param currency – Currency used to specify the amount.
140
+ * @param gtin – Global Trade Item Number including UPC, EAN, JAN and ISBN
141
+ * @param mpn – Unique manufacture ID for product
142
+ * @param brand – Name of the brand Note: Either gtin, mpn or brand is required.
143
+ * @param parameters – Optional fields for deep link specification.
144
+ */
145
+ logProductItem(itemID: string, availability: ProductAvailability, condition: ProductCondition, description: string, imageLink: string, link: string, title: string, priceAmount: number, currency: string, gtin?: string, mpn?: string, brand?: string, parameters?: Params): void;
146
+ /**
147
+ * Explicitly kicks off flushing of events to Facebook.
148
+ */
149
+ flush(): void;
150
+ /**
151
+ * Sets a custom user ID to associate with all app events.
152
+ * The userID is persisted until this method is called again with a null userId
153
+ */
154
+ setUserID(userID: string | null): void;
155
+ /**
156
+ * Clears the currently set user id.
157
+ * @deprecated use setUserID(null) instead
158
+ */
159
+ clearUserID(): void;
160
+ /**
161
+ * Returns user id or null if not set
162
+ */
163
+ getUserID(): Promise<string | null>;
164
+ /**
165
+ * Returns anonymous id or null if not set
166
+ */
167
+ getAnonymousID(): Promise<string | null>;
168
+ /**
169
+ * Returns advertiser id or null if not set
170
+ */
171
+ getAdvertiserID(): Promise<string | null>;
172
+ /**
173
+ * Returns advertiser id or null if not set.
174
+ * @platform android
175
+ */
176
+ getAttributionID(): Promise<string | null>;
177
+ /**
178
+ * Set additional data about the user to increase chances of matching a Facebook user.
179
+ */
180
+ setUserData(userData: UserData): void;
181
+ /**
182
+ * For iOS only, sets and sends device token to register the current application for push notifications.
183
+ * @platform ios
184
+ */
185
+ setPushNotificationsDeviceToken(deviceToken: string): void;
186
+ /**
187
+ * For Android only, sets and sends registration id to register the current app for push notifications.
188
+ * @platform Android
189
+ */
190
+ setPushNotificationsRegistrationId(registrationId: string): void;
191
+ /**
192
+ * Predefined event names for logging events common to many apps.
193
+ */
194
+ AppEvents: AppEvent;
195
+ /**
196
+ * Predefined event name parameters for common additional information to accompany events logged through the `logEvent`.
197
+ */
198
+ AppEventParams: AppEventParam;
199
+ };
200
+ export default _default;
201
+ //# sourceMappingURL=FBAppEventsLogger.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FBAppEventsLogger.d.ts","sourceRoot":"","sources":["../../src/FBAppEventsLogger.ts"],"names":[],"mappings":"AA2BA;;GAEG;AACH,MAAM,MAAM,sBAAsB;AAChC;;;GAGG;AACD,MAAM;AACR;;GAEG;GACD,eAAe,CAAC;AAEpB;;GAEG;AACH,MAAM,MAAM,mBAAmB;AAC7B;;GAEG;AACD,UAAU;AACZ;;GAEG;GACD,cAAc;AAChB;;GAEG;GACD,UAAU;AACZ;;GAEG;GACD,qBAAqB;AACvB;;GAEG;GACD,cAAc,CAAC;AAEnB;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG,KAAK,GAAG,aAAa,GAAG,MAAM,CAAC;AAE9D,MAAM,MAAM,MAAM,GAAG;IAAC,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAA;CAAC,CAAC;AAEtD;;;;GAIG;AACH,MAAM,MAAM,QAAQ,GAAG,QAAQ,CAAC;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,GAAG,GAAG,GAAG,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,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AAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;;IASA;;;OAGG;oCAC6B,sBAAsB;IAItD;;;;;;;;OAQG;wBACiB,MAAM,WAAW,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC;IAY3D;;OAEG;gCAEe,MAAM,gBACR,MAAM,eACP,MAAM;IAKrB;;OAEG;sCAC+B,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC;IAIjE;;;;;;;;;;;;;;;OAeG;2BAEO,MAAM,gBACA,mBAAmB,aACtB,gBAAgB,eACd,MAAM,aACR,MAAM,QACX,MAAM,SACL,MAAM,eACA,MAAM,YACT,MAAM,SACT,MAAM,QACP,MAAM,UACJ,MAAM,eACD,MAAM;IAoErB;;OAEG;;IAKH;;;OAGG;sBACe,MAAM,GAAG,IAAI;IAI/B;;;OAGG;;IAKH;;OAEG;iBACgB,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAIzC;;OAEG;sBACqB,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAI9C;;OAEG;uBACsB,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAI/C;;;OAGG;wBACuB,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAOhD;;OAEG;0BACmB,QAAQ;IAI9B;;;OAGG;iDAC0C,MAAM;IAInD;;;OAGG;uDACgD,MAAM;IAIzD;;OAEG;;IAGH;;OAEG;;;AAtOL,wBAwOE"}
@@ -0,0 +1,5 @@
1
+ declare const _default: {
2
+ fetchDeferredAppLink(): Promise<string | null>;
3
+ };
4
+ export default _default;
5
+ //# sourceMappingURL=FBAppLink.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FBAppLink.d.ts","sourceRoot":"","sources":["../../src/FBAppLink.ts"],"names":[],"mappings":";4BA0B0B,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;;AADhD,wBAIE"}
@@ -0,0 +1,29 @@
1
+ export type AuthenticationTokenMap = {
2
+ authenticationToken: string;
3
+ nonce: string;
4
+ graphDomain: string;
5
+ };
6
+ /**
7
+ * Represents an immutable access token for using Facebook services.
8
+ */
9
+ declare class FBAuthenticationToken {
10
+ /**
11
+ The raw token string from the authentication response
12
+ */
13
+ authenticationToken: string;
14
+ /**
15
+ The nonce from the decoded authentication response
16
+ */
17
+ nonce: string;
18
+ /**
19
+ The graph domain where the user is authenticated.
20
+ */
21
+ graphDomain: string;
22
+ constructor(tokenMap: AuthenticationTokenMap);
23
+ /**
24
+ * Getter for the authentication token
25
+ */
26
+ static getAuthenticationTokenIOS(): Promise<FBAuthenticationToken | null>;
27
+ }
28
+ export default FBAuthenticationToken;
29
+ //# sourceMappingURL=FBAuthenticationToken.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FBAuthenticationToken.d.ts","sourceRoot":"","sources":["../../src/FBAuthenticationToken.ts"],"names":[],"mappings":"AAOA,MAAM,MAAM,sBAAsB,GAAG;IACnC,mBAAmB,EAAE,MAAM,CAAC;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF;;GAEG;AACH,cAAM,qBAAqB;IACzB;;QAEI;IACJ,mBAAmB,EAAE,MAAM,CAAC;IAE5B;;QAEI;IACJ,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;gBAER,QAAQ,EAAE,sBAAsB;IAO5C;;OAEG;IACH,MAAM,CAAC,yBAAyB;CAgBjC;AAED,eAAe,qBAAqB,CAAC"}
@@ -0,0 +1,39 @@
1
+ /**
2
+ * Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
3
+ *
4
+ * You are hereby granted a non-exclusive, worldwide, royalty-free license to use,
5
+ * copy, modify, and distribute this software in source code or binary form for use
6
+ * in connection with the web services and APIs provided by Facebook.
7
+ *
8
+ * As with any software that integrates with the Facebook platform, your use of
9
+ * this software is subject to the Facebook Developer Principles and Policies
10
+ * [http://developers.facebook.com/policy/]. This copyright notice shall be
11
+ * included in all copies or substantial portions of the software.
12
+ *
13
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
15
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
16
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
17
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
18
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
19
+ *
20
+ * @format
21
+ */
22
+ import { GameRequestContent } from './models/FBGameRequestContent';
23
+ import { RNFBSDKCallback } from './models/FBSDKCallback';
24
+ export type GameRequestDialogResult = RNFBSDKCallback & {
25
+ requestId: string;
26
+ to: Array<string>;
27
+ };
28
+ declare const _default: {
29
+ /**
30
+ * Check if the dialog can be shown.
31
+ */
32
+ canShow(): Promise<boolean>;
33
+ /**
34
+ * Shows the dialog using the specified content.
35
+ */
36
+ show(gameRequestContent: GameRequestContent): Promise<GameRequestDialogResult>;
37
+ };
38
+ export default _default;
39
+ //# sourceMappingURL=FBGameRequestDialog.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FBGameRequestDialog.d.ts","sourceRoot":"","sources":["../../src/FBGameRequestDialog.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,OAAO,EAAC,kBAAkB,EAAC,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAC,eAAe,EAAC,MAAM,wBAAwB,CAAC;AAKvD,MAAM,MAAM,uBAAuB,GAAG,eAAe,GAAG;IACtD,SAAS,EAAE,MAAM,CAAC;IAClB,EAAE,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;CACnB,CAAC;;IAGA;;OAEG;eACQ,OAAO,CAAC,OAAO,CAAC;IAI3B;;OAEG;6BAEmB,kBAAkB,GACrC,OAAO,CAAC,uBAAuB,CAAC;;AAbrC,wBAgBE"}
@@ -0,0 +1,70 @@
1
+ /**
2
+ * Copyright (c) 2015-present, Facebook, Inc. All rights reserved.
3
+ *
4
+ * You are hereby granted a non-exclusive, worldwide, royalty-free license to use,
5
+ * copy, modify, and distribute this software in source code or binary form for use
6
+ * in connection with the web services and APIs provided by Facebook.
7
+ *
8
+ * As with any software that integrates with the Facebook platform, your use of
9
+ * this software is subject to the Facebook Developer Principles and Policies
10
+ * [http://developers.facebook.com/policy/]. This copyright notice shall be
11
+ * included in all copies or substantial portions of the software.
12
+ *
13
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
15
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
16
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
17
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
18
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
19
+ *
20
+ * @format
21
+ */
22
+ export type GraphRequestCallback = (error?: Record<string, unknown>, result?: Record<string, unknown>) => void;
23
+ export type GraphRequestConfig = {
24
+ /**
25
+ * The httpMethod to use for the request, for example "GET" or "POST".
26
+ */
27
+ httpMethod?: string;
28
+ /**
29
+ * The Graph API version to use (e.g., "v2.0")
30
+ */
31
+ version?: string;
32
+ /**
33
+ * The request parameters.
34
+ */
35
+ parameters?: GraphRequestParameters;
36
+ /**
37
+ * The access token used by the request.
38
+ */
39
+ accessToken?: string;
40
+ };
41
+ export type GraphRequestParameters = {
42
+ [key: string]: unknown;
43
+ };
44
+ /**
45
+ * Represents a Graph API request and provides batch request supports.
46
+ */
47
+ declare class FBGraphRequest {
48
+ /**
49
+ * The Graph API endpoint to use for the request, for example "me".
50
+ */
51
+ graphPath: string;
52
+ /**
53
+ * The optional config for the request.
54
+ */
55
+ config: GraphRequestConfig;
56
+ /**
57
+ * Called upon completion or failure of the request.
58
+ */
59
+ callback: GraphRequestCallback;
60
+ /**
61
+ * Constructs a new Graph API request.
62
+ */
63
+ constructor(graphPath: string, config?: GraphRequestConfig, callback?: GraphRequestCallback);
64
+ /**
65
+ * Adds a string parameter to the request.
66
+ */
67
+ addStringParameter(paramString: string, key: string): void;
68
+ }
69
+ export default FBGraphRequest;
70
+ //# sourceMappingURL=FBGraphRequest.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FBGraphRequest.d.ts","sourceRoot":"","sources":["../../src/FBGraphRequest.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,MAAM,MAAM,oBAAoB,GAAG,CACjC,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/B,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAC7B,IAAI,CAAC;AACV,MAAM,MAAM,kBAAkB,GAAG;IAC/B;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,UAAU,CAAC,EAAE,sBAAsB,CAAC;IACpC;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AACF,MAAM,MAAM,sBAAsB,GAAG;IAAC,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CAAC,CAAC;AAE9D;;GAEG;AACH,cAAM,cAAc;IAClB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,MAAM,EAAE,kBAAkB,CAAC;IAE3B;;OAEG;IACH,QAAQ,EAAE,oBAAoB,CAAC;IAE/B;;OAEG;gBAED,SAAS,EAAE,MAAM,EACjB,MAAM,CAAC,EAAE,kBAAkB,EAC3B,QAAQ,CAAC,EAAE,oBAAoB;IAOjC;;OAEG;IACH,kBAAkB,CAAC,WAAW,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM;CAKpD;AAED,eAAe,cAAc,CAAC"}
@@ -0,0 +1,51 @@
1
+ /**
2
+ * Copyright (c) 2015-present, Facebook, Inc. All rights reserved.
3
+ *
4
+ * You are hereby granted a non-exclusive, worldwide, royalty-free license to use,
5
+ * copy, modify, and distribute this software in source code or binary form for use
6
+ * in connection with the web services and APIs provided by Facebook.
7
+ *
8
+ * As with any software that integrates with the Facebook platform, your use of
9
+ * this software is subject to the Facebook Developer Principles and Policies
10
+ * [http://developers.facebook.com/policy/]. This copyright notice shall be
11
+ * included in all copies or substantial portions of the software.
12
+ *
13
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
15
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
16
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
17
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
18
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
19
+ *
20
+ * @format
21
+ */
22
+ import GraphRequest from './FBGraphRequest';
23
+ export type Callback = (error?: Record<string, unknown>, result?: Record<string, unknown>) => void;
24
+ declare class FBGraphRequestManager {
25
+ requestBatch: Array<GraphRequest>;
26
+ requestCallbacks: Array<Callback | undefined>;
27
+ batchCallback: Callback | null;
28
+ /**
29
+ * Add a graph request.
30
+ */
31
+ addRequest(request: GraphRequest): FBGraphRequestManager;
32
+ /**
33
+ * Add call back to the GraphRequestManager. Only one callback can be added.
34
+ * Note that invocation of the batch callback does not indicate success of every
35
+ * graph request made, only that the entire batch has finished executing.
36
+ */
37
+ addBatchCallback(callback: (error?: Record<string, unknown>, result?: Record<string, unknown>) => void): FBGraphRequestManager;
38
+ /**
39
+ * Executes requests in a batch.
40
+ * Note that when there's an issue with network connection the batch callback
41
+ * behavior differs in Android and iOS.
42
+ * On iOS, the batch callback returns an error if the batch fails with a network error.
43
+ * On Android, the batch callback always returns {"result": "batch finished executing"}
44
+ * after the batch time out. This is because detecting network status requires
45
+ * extra permission and it's unncessary for the sdk. Instead, you can use the NetInfo module
46
+ * in react-native to get the network status.
47
+ */
48
+ start(timeout?: number): void;
49
+ }
50
+ export default FBGraphRequestManager;
51
+ //# sourceMappingURL=FBGraphRequestManager.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FBGraphRequestManager.d.ts","sourceRoot":"","sources":["../../src/FBGraphRequestManager.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,OAAO,YAAsC,MAAM,kBAAkB,CAAC;AAKtE,MAAM,MAAM,QAAQ,GAAG,CACrB,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/B,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAC7B,IAAI,CAAC;AAuBV,cAAM,qBAAqB;IACzB,YAAY,EAAE,KAAK,CAAC,YAAY,CAAC,CAAM;IACvC,gBAAgB,EAAE,KAAK,CAAC,QAAQ,GAAG,SAAS,CAAC,CAAM;IACnD,aAAa,EAAE,QAAQ,GAAG,IAAI,CAAQ;IAEtC;;OAEG;IACH,UAAU,CAAC,OAAO,EAAE,YAAY,GAAG,qBAAqB;IAOxD;;;;OAIG;IACH,gBAAgB,CACd,QAAQ,EAAE,CACR,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/B,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAC7B,IAAI,GACR,qBAAqB;IAKxB;;;;;;;;;OASG;IACH,KAAK,CAAC,OAAO,CAAC,EAAE,MAAM;CAsBvB;AAED,eAAe,qBAAqB,CAAC"}
@@ -0,0 +1,92 @@
1
+ /**
2
+ * Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
3
+ *
4
+ * You are hereby granted a non-exclusive, worldwide, royalty-free license to use,
5
+ * copy, modify, and distribute this software in source code or binary form for use
6
+ * in connection with the web services and APIs provided by Facebook.
7
+ *
8
+ * As with any software that integrates with the Facebook platform, your use of
9
+ * this software is subject to the Facebook Developer Principles and Policies
10
+ * [http://developers.facebook.com/policy/]. This copyright notice shall be
11
+ * included in all copies or substantial portions of the software.
12
+ *
13
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
15
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
16
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
17
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
18
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
19
+ *
20
+ * @format
21
+ */
22
+ import { DefaultAudience, LoginBehaviorAndroid, LoginResult, LoginTracking } from './FBLoginManager';
23
+ import * as React from 'react';
24
+ import { ViewStyle } from 'react-native';
25
+ export type Event = {
26
+ nativeEvent?: {
27
+ type?: 'loginFinished' | 'logoutFinished';
28
+ error: Record<string, unknown>;
29
+ result: LoginResult;
30
+ };
31
+ };
32
+ export type TooltipBehaviorIOS = 'auto' | 'force_display' | 'disable';
33
+ /**
34
+ * A button that initiates a log in or log out flow upon tapping.
35
+ */
36
+ declare class LoginButton extends React.Component<{
37
+ /**
38
+ * Represents the permissions to request when the login button
39
+ * is pressed.
40
+ */
41
+ permissions?: Array<string>;
42
+ /**
43
+ * The callback invoked upon error/completion of a login request.
44
+ */
45
+ onLoginFinished?: (error: Record<string, unknown>, result: LoginResult) => void;
46
+ /**
47
+ * The callback invoked upon completion of a logout request.
48
+ */
49
+ onLogoutFinished?: () => void;
50
+ /**
51
+ * The behavior to use when attempting a login.
52
+ * @platform android
53
+ */
54
+ loginBehaviorAndroid?: LoginBehaviorAndroid;
55
+ /**
56
+ * The default audience to target when attempting a login.
57
+ */
58
+ defaultAudience?: DefaultAudience;
59
+ /**
60
+ * For iOS only, the desired tooltip behavior.
61
+ * @platform ios
62
+ */
63
+ tooltipBehaviorIOS?: TooltipBehaviorIOS;
64
+ /**
65
+ * Gets or sets an optional nonce to use for login attempts. A valid nonce must be a non-empty string without
66
+ * whitespace. An invalid nonce will not be set. Instead, default unique nonces will be used for login attempts.
67
+ * @platform ios
68
+ */
69
+ nonceIOS?: string;
70
+ /**
71
+ * Gets or sets the desired tracking preference to use for login attempts. Defaults to `enabled`
72
+ * @platform ios
73
+ */
74
+ loginTrackingIOS?: LoginTracking;
75
+ /**
76
+ * View style, if any.
77
+ */
78
+ style?: ViewStyle;
79
+ /**
80
+ * testID, if any.
81
+ */
82
+ testID?: string;
83
+ }> {
84
+ static defaultProps: {
85
+ style: typeof styles.defaultButtonStyle;
86
+ };
87
+ _eventHandler(event: Event): void;
88
+ render(): React.JSX.Element;
89
+ }
90
+ declare const styles: any;
91
+ export default LoginButton;
92
+ //# sourceMappingURL=FBLoginButton.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FBLoginButton.d.ts","sourceRoot":"","sources":["../../src/FBLoginButton.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;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