Permalink
Browse files

Facebook iOS SDK 3.5 (see https://developers.facebook.com/ios/change-…

…log-3.x/)

Summary:
    See what's new
     https://developers.facebook.com/ios/features/whats-new-ios-sdk-3.5/
    Or read the announcement at
     https://developers.facebook.com/blog/post/2013/04/18/next-evolution-of-facebook-platform-for-mobile/

Reviewed By: jacl

Test Plan: Release Testing.

@update-submodule: vendor/OCHamcrest
@update-submodule: vendor/OCMock
@update-submodule: vendor/OHHTTPStubs
  • Loading branch information...
1 parent 836cec3 commit 4778430b98574e4919d0a24c367f340029c97e6a @chrisp-fb chrisp-fb committed Apr 18, 2013
Showing with 9,920 additions and 15,261 deletions.
  1. +9 −0 .gitmodules
  2. +0 −79 samples/BooleanOGSample/BooleanOGSample/BOGAppDelegate.m
  3. +0 −257 samples/BooleanOGSample/BooleanOGSample/BOGFirstViewController.m
  4. +0 −4,790 samples/BooleanOGSample/BooleanOGSample/en.lproj/BOGFirstViewController_iPad.xib
  5. +0 −4,787 samples/BooleanOGSample/BooleanOGSample/en.lproj/BOGFirstViewController_iPhone.xib
  6. BIN samples/BooleanOGSample/BooleanOGSample/first.png
  7. BIN samples/BooleanOGSample/BooleanOGSample/first@2x.png
  8. BIN samples/BooleanOGSample/BooleanOGSample/second.png
  9. BIN samples/BooleanOGSample/BooleanOGSample/second@2x.png
  10. +0 −25 samples/BooleanOGSample/ReadMe.txt
  11. +11 −7 samples/FriendPickerSample/FriendPickerSample.xcodeproj/project.pbxproj
  12. +1 −1 samples/FriendPickerSample/FriendPickerSample/FPAppDelegate.h
  13. +6 −2 samples/FriendPickerSample/FriendPickerSample/FPAppDelegate.m
  14. +1 −1 samples/FriendPickerSample/FriendPickerSample/FPViewController.h
  15. +26 −29 samples/FriendPickerSample/FriendPickerSample/FPViewController.m
  16. +2 −0 samples/FriendPickerSample/FriendPickerSample/FriendPickerSample-Info.plist
  17. +1 −1 samples/FriendPickerSample/FriendPickerSample/main.m
  18. +0 −10 samples/FriendPickerSample/ReadMe.txt
  19. +7 −3 samples/GraphApiSample/GraphApiSample.xcodeproj/project.pbxproj
  20. +1 −1 samples/GraphApiSample/GraphApiSample/GraphApiAppDelegate.h
  21. +7 −2 samples/GraphApiSample/GraphApiSample/GraphApiAppDelegate.m
  22. +2 −0 samples/GraphApiSample/GraphApiSample/GraphApiSample-Info.plist
  23. +1 −1 samples/GraphApiSample/GraphApiSample/GraphApiViewController.h
  24. +1 −1 samples/GraphApiSample/GraphApiSample/GraphApiViewController.m
  25. +1 −1 samples/GraphApiSample/GraphApiSample/main.m
  26. +0 −11 samples/GraphApiSample/ReadMe.txt
  27. +0 −441 samples/Hackbook/Hackbook.xcodeproj/project.pbxproj
  28. +0 −82 samples/Hackbook/Hackbook/APICallsViewController.h
  29. +0 −1,269 samples/Hackbook/Hackbook/APICallsViewController.m
  30. +0 −37 samples/Hackbook/Hackbook/APIResultsViewController.h
  31. +0 −312 samples/Hackbook/Hackbook/APIResultsViewController.m
  32. +0 −244 samples/Hackbook/Hackbook/DataSet.m
  33. BIN samples/Hackbook/Hackbook/Default-568h@2x.png
  34. BIN samples/Hackbook/Hackbook/Default.png
  35. BIN samples/Hackbook/Hackbook/Default@2x.png
  36. BIN samples/Hackbook/Hackbook/FBConnect.bundle/images/LoginNormal.png
  37. BIN samples/Hackbook/Hackbook/FBConnect.bundle/images/LoginNormal@2x.png
  38. BIN samples/Hackbook/Hackbook/FBConnect.bundle/images/LoginPressed.png
  39. BIN samples/Hackbook/Hackbook/FBConnect.bundle/images/LoginPressed@2x.png
  40. BIN samples/Hackbook/Hackbook/FBConnect.bundle/images/LoginWithFacebookNormal.png
  41. BIN samples/Hackbook/Hackbook/FBConnect.bundle/images/LoginWithFacebookNormal@2x.png
  42. BIN samples/Hackbook/Hackbook/FBConnect.bundle/images/LoginWithFacebookPressed.png
  43. BIN samples/Hackbook/Hackbook/FBConnect.bundle/images/LoginWithFacebookPressed@2x.png
  44. BIN samples/Hackbook/Hackbook/FBConnect.bundle/images/LogoutNormal.png
  45. BIN samples/Hackbook/Hackbook/FBConnect.bundle/images/LogoutNormal@2x.png
  46. BIN samples/Hackbook/Hackbook/FBConnect.bundle/images/LogoutPressed.png
  47. BIN samples/Hackbook/Hackbook/FBConnect.bundle/images/LogoutPressed@2x.png
  48. BIN samples/Hackbook/Hackbook/FBConnect.bundle/images/runaround_image.jpg
  49. +0 −71 samples/Hackbook/Hackbook/Hackbook-Info.plist
  50. +0 −14 samples/Hackbook/Hackbook/Hackbook-Prefix.pch
  51. +0 −37 samples/Hackbook/Hackbook/HackbookAppDelegate.h
  52. +0 −157 samples/Hackbook/Hackbook/HackbookAppDelegate.m
  53. BIN samples/Hackbook/Hackbook/Icon-72.png
  54. BIN samples/Hackbook/Hackbook/Icon-72@2x.png
  55. BIN samples/Hackbook/Hackbook/Icon.png
  56. BIN samples/Hackbook/Hackbook/Icon@2x.png
  57. BIN samples/Hackbook/Hackbook/MenuButton.png
  58. BIN samples/Hackbook/Hackbook/MenuButton@2x.png
  59. +0 −51 samples/Hackbook/Hackbook/RootViewController.h
  60. +0 −463 samples/Hackbook/Hackbook/RootViewController.m
  61. +0 −220 samples/Hackbook/Hackbook/en.lproj/MainWindow.xib
  62. +0 −206 samples/Hackbook/Hackbook/iPad/en.lproj/MainWindow-iPad.xib
  63. +0 −37 samples/Hackbook/ReadMe.txt
  64. +6 −2 samples/HelloFacebookSample/HelloFacebookSample.xcodeproj/project.pbxproj
  65. +1 −1 samples/HelloFacebookSample/HelloFacebookSample/HFAppDelegate.h
  66. +11 −7 samples/HelloFacebookSample/HelloFacebookSample/HFAppDelegate.m
  67. +1 −1 samples/HelloFacebookSample/HelloFacebookSample/HFViewController.h
  68. +116 −74 samples/HelloFacebookSample/HelloFacebookSample/HFViewController.m
  69. +2 −0 samples/HelloFacebookSample/HelloFacebookSample/HelloFacebookSample-Info.plist
  70. +100 −16 samples/HelloFacebookSample/HelloFacebookSample/en.lproj/HFViewController_iPad.xib
  71. +1 −1 samples/HelloFacebookSample/HelloFacebookSample/main.m
  72. +0 −11 samples/HelloFacebookSample/ReadMe.txt
  73. +7 −3 samples/PlacePickerSample/PlacePickerSample.xcodeproj/project.pbxproj
  74. +1 −1 samples/PlacePickerSample/PlacePickerSample/PPAppDelegate.h
  75. +7 −3 samples/PlacePickerSample/PlacePickerSample/PPAppDelegate.m
  76. +1 −1 samples/PlacePickerSample/PlacePickerSample/PPViewController.h
  77. +1 −1 samples/PlacePickerSample/PlacePickerSample/PPViewController.m
  78. +2 −0 samples/PlacePickerSample/PlacePickerSample/PlacePickerSample-Info.plist
  79. +1 −1 samples/PlacePickerSample/PlacePickerSample/main.m
  80. +0 −10 samples/PlacePickerSample/ReadMe.txt
  81. +19 −9 samples/ProfilePictureSample/ProfilePictureSample.xcodeproj/project.pbxproj
  82. +1 −1 samples/ProfilePictureSample/ProfilePictureSample/PPAppDelegate.h
  83. +1 −1 samples/ProfilePictureSample/ProfilePictureSample/PPAppDelegate.m
  84. +1 −1 samples/ProfilePictureSample/ProfilePictureSample/PPViewController.h
  85. +1 −1 samples/ProfilePictureSample/ProfilePictureSample/PPViewController.m
  86. +1 −1 samples/ProfilePictureSample/ProfilePictureSample/main.m
  87. +0 −10 samples/ProfilePictureSample/ReadMe.txt
  88. +141 −83 samples/{BooleanOGSample/BooleanOGSample.xcodeproj → RPSSample/RPSSample.xcodeproj}/project.pbxproj
  89. 0 samples/{BooleanOGSample/BooleanOGSample → RPSSample/RPSSample}/Default-568h@2x.png
  90. 0 samples/{BooleanOGSample/BooleanOGSample → RPSSample/RPSSample}/Default.png
  91. 0 samples/{BooleanOGSample/BooleanOGSample → RPSSample/RPSSample}/Default@2x.png
  92. 0 samples/{BooleanOGSample/BooleanOGSample → RPSSample/RPSSample}/Icon-72.png
  93. 0 samples/{BooleanOGSample/BooleanOGSample → RPSSample/RPSSample}/Icon-72@2x.png
  94. 0 samples/{BooleanOGSample/BooleanOGSample → RPSSample/RPSSample}/Icon.png
  95. 0 samples/{BooleanOGSample/BooleanOGSample → RPSSample/RPSSample}/Icon@2x.png
  96. BIN samples/RPSSample/RPSSample/IconFacebook-72@2x.png
  97. +16 −18 samples/{BooleanOGSample/BooleanOGSample → RPSSample/RPSSample}/OGProtocols.h
  98. +4 −3 samples/{BooleanOGSample/BooleanOGSample/BOGAppDelegate.h → RPSSample/RPSSample/RPSAppDelegate.h}
  99. +70 −0 samples/RPSSample/RPSSample/RPSAppDelegate.m
  100. +7 −11 samples/{Hackbook/Hackbook/main.m → RPSSample/RPSSample/RPSCommonObjects.m}
  101. +2 −2 ...ample/BooleanOGSample/BOGSecondViewController.h → RPSSample/RPSSample/RPSFriendsViewController.h}
  102. +96 −86 ...ample/BooleanOGSample/BOGSecondViewController.m → RPSSample/RPSSample/RPSFriendsViewController.m}
  103. +44 −0 samples/RPSSample/RPSSample/RPSGameViewController.h
  104. +517 −0 samples/RPSSample/RPSSample/RPSGameViewController.m
  105. +7 −5 ...anOGSample/BooleanOGSample/BooleanOGSample-Info.plist → RPSSample/RPSSample/RPSSample-Info.plist}
  106. +1 −1 ...anOGSample/BooleanOGSample/BooleanOGSample-Prefix.pch → RPSSample/RPSSample/RPSSample-Prefix.pch}
  107. 0 samples/{Hackbook/Hackbook → RPSSample/RPSSample}/en.lproj/InfoPlist.strings
  108. +8 −101 ...OGSecondViewController_iPad.xib → RPSSample/RPSSample/en.lproj/RPSFriendsViewController_iPad.xib}
  109. +11 −102 ...condViewController_iPhone.xib → RPSSample/RPSSample/en.lproj/RPSFriendsViewController_iPhone.xib}
  110. +743 −0 samples/RPSSample/RPSSample/en.lproj/RPSGameViewController_iPad.xib
  111. +860 −0 samples/RPSSample/RPSSample/en.lproj/RPSGameViewController_iPhone.xib
  112. BIN samples/RPSSample/RPSSample/left-paper-128.png
  113. BIN samples/RPSSample/RPSSample/left-paper-88.png
  114. BIN samples/RPSSample/RPSSample/left-rock-128.png
  115. BIN samples/RPSSample/RPSSample/left-rock-88.png
  116. BIN samples/RPSSample/RPSSample/left-scissors-128.png
  117. BIN samples/RPSSample/RPSSample/left-scissors-88.png
  118. +3 −3 samples/{BooleanOGSample/BooleanOGSample → RPSSample/RPSSample}/main.m
  119. BIN samples/RPSSample/RPSSample/right-paper-128.png
  120. BIN samples/RPSSample/RPSSample/right-paper-88.png
  121. BIN samples/RPSSample/RPSSample/right-rock-128.png
  122. BIN samples/RPSSample/RPSSample/right-rock-88.png
  123. BIN samples/RPSSample/RPSSample/right-scissors-128.png
  124. BIN samples/RPSSample/RPSSample/right-scissors-88.png
  125. +13 −0 samples/RPSSample/ReadMe.txt
  126. +117 −0 samples/RPSSample/post_app_objects.sh
  127. +0 −8 samples/Scrumptious/ReadMe.txt
  128. +20 −2 samples/Scrumptious/Scrumptious.xcodeproj/project.pbxproj
  129. +1 −1 samples/Scrumptious/scrumptious/SCAppDelegate.h
  130. +8 −16 samples/Scrumptious/scrumptious/SCAppDelegate.m
  131. +1 −1 samples/Scrumptious/scrumptious/SCLoginViewController.h
  132. +1 −1 samples/Scrumptious/scrumptious/SCLoginViewController.m
  133. +52 −6 samples/Scrumptious/scrumptious/SCLoginViewController.xib
  134. +11 −7 ...ample/BooleanOGSample/BOGFirstViewController.h → Scrumptious/scrumptious/SCPhotoViewController.h}
  135. +79 −0 samples/Scrumptious/scrumptious/SCPhotoViewController.m
  136. +264 −0 samples/Scrumptious/scrumptious/SCPhotoViewController.xib
  137. +1 −1 samples/Scrumptious/scrumptious/SCProtocols.h
  138. +1 −1 samples/Scrumptious/scrumptious/SCViewController.h
  139. +239 −62 samples/Scrumptious/scrumptious/SCViewController.m
  140. BIN samples/Scrumptious/scrumptious/images/action-photo.png
  141. +1 −1 samples/Scrumptious/scrumptious/main.m
  142. +2 −0 samples/Scrumptious/scrumptious/scrumptious-Info.plist
  143. +0 −11 samples/SessionLoginSample/ReadMe.txt
  144. +22 −10 samples/SessionLoginSample/SessionLoginSample.xcodeproj/project.pbxproj
  145. +1 −1 samples/SessionLoginSample/SessionLoginSample/SLAppDelegate.h
  146. +7 −5 samples/SessionLoginSample/SessionLoginSample/SLAppDelegate.m
  147. +1 −1 samples/SessionLoginSample/SessionLoginSample/SLViewController.h
  148. +1 −1 samples/SessionLoginSample/SessionLoginSample/SLViewController.m
  149. +2 −0 samples/SessionLoginSample/SessionLoginSample/SessionLoginSample-Info.plist
  150. +1 −1 samples/SessionLoginSample/SessionLoginSample/main.m
  151. +0 −10 samples/SwitchUserSample/ReadMe.txt
  152. +7 −3 samples/SwitchUserSample/SwitchUserSample.xcodeproj/project.pbxproj
  153. +1 −1 samples/SwitchUserSample/SwitchUserSample/SUAppDelegate.h
  154. +8 −2 samples/SwitchUserSample/SwitchUserSample/SUAppDelegate.m
  155. +1 −1 samples/SwitchUserSample/SwitchUserSample/SUProfileTableViewCell.h
  156. +1 −1 samples/SwitchUserSample/SwitchUserSample/SUProfileTableViewCell.m
  157. +1 −1 samples/SwitchUserSample/SwitchUserSample/SUSettingsViewController.h
  158. +1 −1 samples/SwitchUserSample/SwitchUserSample/SUSettingsViewController.m
  159. +1 −1 samples/SwitchUserSample/SwitchUserSample/SUUserManager.h
  160. +1 −1 samples/SwitchUserSample/SwitchUserSample/SUUserManager.m
  161. +1 −1 samples/SwitchUserSample/SwitchUserSample/SUUsingViewController.h
  162. +1 −1 samples/SwitchUserSample/SwitchUserSample/SUUsingViewController.m
  163. +2 −0 samples/SwitchUserSample/SwitchUserSample/SwitchUserSample-Info.plist
  164. +1 −1 samples/SwitchUserSample/SwitchUserSample/main.m
  165. +1 −1 scripts/build_all.sh
  166. +15 −3 scripts/build_distribution.sh
  167. +4 −3 scripts/build_documentation.sh
  168. +2 −7 scripts/build_framework.sh
  169. +1 −1 scripts/build_samples.sh
  170. +3 −1 scripts/common.sh
  171. +1 −1 scripts/configure_simulator_for_unit_tests.sh
  172. +1 −1 scripts/label_version_number.sh
  173. +1 −1 scripts/rm_test_users.py
  174. +71 −0 scripts/run_tests.sh
  175. +8 −12 src/{FBContentLink.h → Base64/FBBase64.h}
  176. +203 −0 src/Base64/FBBase64.m
  177. +53 −0 src/Cryptography/FBCrypto.h
  178. +260 −0 src/Cryptography/FBCrypto.m
  179. +1 −1 src/FBAccessTokenData+Internal.h
  180. +1 −1 src/FBAccessTokenData.h
  181. +6 −12 src/FBAccessTokenData.m
  182. +38 −0 src/FBAppBridge.h
  183. +633 −0 src/FBAppBridge.m
  184. +52 −0 src/FBAppBridgeTypeToJSONConverter.h
  185. +190 −0 src/FBAppBridgeTypeToJSONConverter.m
  186. +33 −0 src/FBAppCall+Internal.h
  187. +185 −0 src/FBAppCall.h
  188. +334 −0 src/FBAppCall.m
  189. +25 −0 src/FBAppLinkData+Internal.h
  190. +39 −0 src/FBAppLinkData.h
  191. +98 −0 src/FBAppLinkData.m
  192. +1 −1 src/FBCacheDescriptor.h
  193. +2 −2 src/FBCacheDescriptor.m
  194. +1 −1 src/FBCacheIndex.h
  195. +1 −2 src/FBCacheIndex.m
  196. +1 −2 src/FBConnect.h
  197. +0 −62 src/FBContentLink.m
  198. +1 −1 src/FBDataDiskCache.h
  199. +1 −1 src/FBDataDiskCache.m
  200. +1 −1 src/FBDialog.h
  201. +8 −19 src/FBDialog.m
  202. +51 −0 src/FBDialogs+Internal.h
  203. +488 −0 src/FBDialogs.h
  204. +383 −0 src/FBDialogs.m
  205. +28 −0 src/FBDialogsData+Internal.h
  206. +35 −0 src/FBDialogsData.h
  207. +72 −0 src/FBDialogsData.m
  208. +36 −0 src/FBDialogsParams+Internal.h
  209. +28 −0 src/FBDialogsParams.h
  210. +42 −0 src/FBDialogsParams.m
  211. +92 −11 src/FBError.h
  212. +10 −5 src/FBError.m
  213. +48 −0 src/FBErrorUtility+Internal.h
  214. +43 −23 src/FBErrorUtility.h
  215. +51 −3 src/FBErrorUtility.m
  216. +6 −3 src/FBFetchedAppSettings.h
  217. +4 −2 src/FBFetchedAppSettings.m
  218. +1 −3 src/FBFrictionlessRecipientCache.m
  219. +1 −1 src/FBFrictionlessRequestSettings.h
  220. +1 −1 src/FBFrictionlessRequestSettings.m
  221. +1 −1 src/FBFriendPickerCacheDescriptor.h
  222. +1 −1 src/FBFriendPickerCacheDescriptor.m
  223. +2 −2 src/FBFriendPickerViewController+Internal.h
  224. +1 −1 src/FBFriendPickerViewController.h
  225. +1 −1 src/FBFriendPickerViewController.m
  226. +2 −2 src/FBGraphLocation.h
  227. +47 −2 src/FBGraphObject.h
  228. +53 −1 src/FBGraphObject.m
  229. +1 −1 src/FBGraphObjectPagingLoader.h
  230. +1 −1 src/FBGraphObjectPagingLoader.m
  231. +1 −1 src/FBGraphObjectTableCell.h
  232. +1 −1 src/FBGraphObjectTableCell.m
  233. +1 −1 src/FBGraphObjectTableDataSource.h
  234. +1 −1 src/FBGraphObjectTableDataSource.m
  235. +2 −2 src/FBGraphObjectTableSelection.h
  236. +1 −1 src/FBGraphObjectTableSelection.m
  237. +2 −2 src/FBGraphPlace.h
  238. +2 −2 src/FBGraphUser.h
  239. +23 −1 src/FBInsights+Internal.h
  240. +22 −10 src/FBInsights.h
  241. +127 −29 src/FBInsights.m
  242. +1 −1 src/FBLogger.h
  243. +1 −1 src/FBLogger.m
  244. +1 −1 src/FBLoginDialog.h
  245. +1 −1 src/FBLoginDialog.m
  246. +39 −0 src/FBLoginDialogParams.h
  247. +76 −0 src/FBLoginDialogParams.m
  248. +1 −1 src/FBLoginView.h
  249. +1 −1 src/FBLoginView.m
  250. +36 −98 src/FBNativeDialogs.h
  251. +42 −127 src/FBNativeDialogs.m
  252. +4 −4 src/FBOpenGraphAction.h
  253. +43 −0 src/FBOpenGraphActionShareDialogParams.h
  254. +181 −0 src/FBOpenGraphActionShareDialogParams.m
  255. +76 −0 src/FBOpenGraphObject.h
  256. +1 −1 src/FBPlacePickerCacheDescriptor.h
  257. +1 −1 src/FBPlacePickerCacheDescriptor.m
  258. +2 −2 src/FBPlacePickerViewController+Internal.h
  259. +1 −1 src/FBPlacePickerViewController.h
  260. +1 −1 src/FBPlacePickerViewController.m
  261. +1 −1 src/FBProfilePictureView.h
  262. +1 −1 src/FBProfilePictureView.m
  263. +177 −13 src/FBRequest.h
  264. +105 −2 src/FBRequest.m
  265. +1 −1 src/FBRequestBody.h
  266. +1 −1 src/FBRequestBody.m
  267. +1 −1 src/FBRequestConnection+Internal.h
  268. +155 −4 src/FBRequestConnection.h
  269. +91 −18 src/FBRequestConnection.m
  270. +2 −2 src/FBSDKVersion.h
  271. +20 −1 src/FBSession+Internal.h
  272. +1 −1 src/FBSession+Protected.h
  273. +14 −6 src/FBSession.h
  274. +459 −217 src/FBSession.m
  275. +1 −1 src/FBSessionInsightsState.h
  276. +1 −1 src/FBSessionInsightsState.m
  277. +1 −1 src/FBSessionManualTokenCachingStrategy.h
  278. +2 −2 src/FBSessionManualTokenCachingStrategy.m
  279. +2 −2 src/FBSessionTokenCachingStrategy.h
  280. +1 −1 src/FBSessionTokenCachingStrategy.m
  281. +9 −1 src/FBSettings+Internal.h
  282. +114 −1 src/FBSettings.h
  283. +73 −2 src/FBSettings.m
  284. +66 −0 src/FBShareDialogParams.h
  285. +141 −0 src/FBShareDialogParams.m
  286. +1 −1 src/FBSystemAccountStoreAdapter.h
  287. +2 −2 src/FBSystemAccountStoreAdapter.m
  288. +1 −1 src/FBTestSession+Internal.h
  289. +1 −1 src/FBTestSession.h
  290. +9 −12 src/FBTestSession.m
  291. +1 −1 src/FBURLConnection.h
  292. +74 −51 src/FBURLConnection.m
  293. +1 −1 src/FBUserSettingsViewController.h
  294. +1 −1 src/FBUserSettingsViewController.m
  295. +15 −2 src/FBUtility.h
  296. +109 −24 src/FBUtility.m
  297. +1 −1 src/FBViewController+Internal.h
  298. +1 −1 src/FBViewController.h
  299. +1 −1 src/FBViewController.m
  300. +2 −2 src/FBWebDialogs.h
Sorry, we could not display the entire diff because too many files (388) changed.
View
9 .gitmodules
@@ -0,0 +1,9 @@
+[submodule "vendor/OHHTTPStubs"]
+ path = vendor/OHHTTPStubs
+ url = git://github.com/AliSoftware/OHHTTPStubs.git
+[submodule "vendor/OCMock"]
+ path = vendor/OCMock
+ url = git://github.com/erikdoe/ocmock
+[submodule "vendor/OCHamcrest"]
+ path = vendor/OCHamcrest
+ url = git://github.com/hamcrest/OCHamcrest
View
79 samples/BooleanOGSample/BooleanOGSample/BOGAppDelegate.m
@@ -1,79 +0,0 @@
-/*
- * Copyright 2012 Facebook
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
-
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#import "BOGAppDelegate.h"
-#import "BOGFirstViewController.h"
-#import "BOGSecondViewController.h"
-
-@implementation BOGAppDelegate
-
-@synthesize window = _window;
-@synthesize tabBarController = _tabBarController;
-
-// FBSample logic
-// The native facebook application transitions back to an authenticating application when the user
-// chooses to either log in, or cancel. This call to handleOpenURL manages that transition. See the
-// "Just Login" sample application for deeper discussion on this topic.
-- (BOOL)application:(UIApplication *)application
- openURL:(NSURL *)url
- sourceApplication:(NSString *)sourceApplication
- annotation:(id)annotation {
- return [FBSession.activeSession handleOpenURL:url];
-}
-
-// FBSample logic
-// Open session objects should be closed when no longer useful
-- (void)applicationWillTerminate:(UIApplication *)application {
- // all good things must come to an end
- // this is a good idea because things may be hanging off the session, that need
- // releasing (completion block, etc.) and other components in the app may be awaiting
- // close notification in order to do cleanup
- [FBSession.activeSession close];
-}
-
-// FBSample logic
-// The session management and login behavior of this sample is very simplistic; for deeper coverage of
-// this topic see the "Just Login" or "Switch User" sample applicaitons
-- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
- self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
- // Override point for customization after application launch.
- UIViewController *viewControllerMe, *viewControllerFriends;
- FBUserSettingsViewController *viewControllerSettings;
- if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) {
- viewControllerMe = [[BOGFirstViewController alloc] initWithNibName:@"BOGFirstViewController_iPhone" bundle:nil];
- viewControllerFriends = [[BOGSecondViewController alloc] initWithNibName:@"BOGSecondViewController_iPhone" bundle:nil];
- } else {
- viewControllerMe = [[BOGFirstViewController alloc] initWithNibName:@"BOGFirstViewController_iPad" bundle:nil];
- viewControllerFriends = [[BOGSecondViewController alloc] initWithNibName:@"BOGSecondViewController_iPad" bundle:nil];
- }
- viewControllerSettings = [[FBUserSettingsViewController alloc] init];
- viewControllerSettings.title = @"Facebook Settings";
- viewControllerSettings.tabBarItem.image = [UIImage imageNamed:@"second"];
-
- self.tabBarController = [[UITabBarController alloc] init];
- self.tabBarController.viewControllers = [NSArray arrayWithObjects:viewControllerMe, viewControllerFriends, viewControllerSettings, nil];
- self.window.rootViewController = self.tabBarController;
- [self.window makeKeyAndVisible];
-
- // FBSample logic
- // We open the session up front, as long as we have a cached token, otherwise rely on the user
- // to login explicitly with the FBUserSettingsViewController tab
- [FBSession openActiveSessionWithAllowLoginUI:NO];
-
- return YES;
-}
-
-@end
View
257 samples/BooleanOGSample/BooleanOGSample/BOGFirstViewController.m
@@ -1,257 +0,0 @@
-/*
- * Copyright 2012 Facebook
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
-
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#import "BOGFirstViewController.h"
-#import "BOGAppDelegate.h"
-#import <FacebookSDK/FacebookSDK.h>
-#import "OGProtocols.h"
-
-@interface BOGFirstViewController () <UIPickerViewDelegate>
-
-- (void)postAction:(NSString *)actionPath
- leftOperand:(BOOL)left
- rightOperand:(BOOL)right
- result:(BOOL)result
- tryReauthIfNeeded:(BOOL)tryReauthIfNeeded;
-- (NSString *)stringForTruthValue:(BOOL)truthValue;
-+ (id<BOGGraphTruthValue>)ogObjectForTruthValue:(BOOL)value;
-
-@end
-
-@implementation BOGFirstViewController
-
-@synthesize leftPicker = _leftPicker;
-@synthesize rightPicker = _rightPicker;
-@synthesize resultTextView = _resultTextView;
-
-- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
- self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
- if (self) {
- self.title = NSLocalizedString(@"You Rock!", @"You Rock!");
- self.tabBarItem.image = [UIImage imageNamed:@"first"];
- }
- return self;
-}
-
-#pragma mark - View lifecycle
-
-- (void)viewDidUnload {
- self.leftPicker = nil;
- self.rightPicker = nil;
- self.resultTextView = nil;
-
- [super viewDidUnload];
-}
-
-- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
- // Return YES for supported orientations
- if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) {
- return (interfaceOrientation != UIInterfaceOrientationPortraitUpsideDown);
- } else {
- return YES;
- }
-}
-
-#pragma mark - Button handlers
-
-// FBSample logic
-// Handler for the "And" button, determines the left and right truth values, and then
-// calls a helper to post a custom action
-- (IBAction)pressedAnd:(id)sender {
-
- BOOL left = [self.leftPicker selectedRowInComponent:0];
- BOOL right = [self.rightPicker selectedRowInComponent:0];
- BOOL result = left && right;
- self.resultTextView.text = [NSString stringWithFormat:@"%@ AND %@ = %@",
- [self stringForTruthValue:left],
- [self stringForTruthValue:right],
- [self stringForTruthValue:result]];
-
- // posts an "and" OG action, the path below is the normal form for custom OG actions (in this case 'and')
- [self postAction:@"me/fb_sample_boolean_og:and"
- leftOperand:left
- rightOperand:right
- result:result
- tryReauthIfNeeded:YES];
-}
-
-// FBSample logic
-// Handler for the "Or" button, determines the left and right truth values, and then
-// calls a helper to post a custom action
-- (IBAction)pressedOr:(id)sender {
-
- BOOL left = [self.leftPicker selectedRowInComponent:0];
- BOOL right = [self.rightPicker selectedRowInComponent:0];
- BOOL result = left || right;
- self.resultTextView.text = [NSString stringWithFormat:@"%@ OR %@ = %@",
- [self stringForTruthValue:left],
- [self stringForTruthValue:right],
- [self stringForTruthValue:result]];
-
- // posts an "or" OG action, the path below is the normal form for custom OG actions (in this case 'or')
- [self postAction:@"me/fb_sample_boolean_og:or"
- leftOperand:left
- rightOperand:right
- result:result
- tryReauthIfNeeded:YES];
-}
-
-#pragma mark - UIPickerViewDelegate impl
-
-// FBSample logic
-// There isn't any real facebook specific logic in the next four methods, they simply wire up the
-// behavior for the two picker-views
-- (NSInteger)numberOfComponentsInPickerView:(UIPickerView *)pickerView {
- return 1;
-}
-
-- (NSInteger)pickerView:(UIPickerView *)pickerView numberOfRowsInComponent:(NSInteger)component {
- return 2;
-}
-
-- (NSString *)pickerView:(UIPickerView *)pickerView
- titleForRow:(NSInteger)row
- forComponent:(NSInteger)component {
- return row ? @"True" : @"False";
-}
-
-- (void)pickerView:(UIPickerView *)pickerView
- didSelectRow:(NSInteger)row
- inComponent:(NSInteger)component {
- self.resultTextView.text = @"";
-}
-
-#pragma mark - private methods
-
-// FBSample logic
-// This is the workhorse method of this view. It sets up the content for a custom OG action, and then posts it
-// using FBRequest/FBRequestConnection. This method also uses the custom protocols defined in
-// OGProtocols.h (defined in this sample application), in order to create and consume actions in a typed fashion
-- (void)postAction:(NSString *)actionPath
- leftOperand:(BOOL)left
- rightOperand:(BOOL)right
- result:(BOOL)result
- tryReauthIfNeeded:(BOOL)tryReauthIfNeeded {
-
- // if we have a valid session, then we post the action to the users wall, else noop
- if (FBSession.activeSession.isOpen) {
-
- // if we don't have permission to post, let's first address that
- if ([FBSession.activeSession.permissions indexOfObject:@"publish_actions"] == NSNotFound) {
- [FBSession.activeSession requestNewPublishPermissions:@[@"publish_actions"]
- defaultAudience:FBSessionDefaultAudienceFriends
- completionHandler:^(FBSession *session, NSError *error) {
- if (!error) {
- // re-call assuming we now have the permission
- [self postAction:actionPath
- leftOperand:left
- rightOperand:right
- result:result
- tryReauthIfNeeded:NO];
- }
- }];
- } else {
-
- // create an object to hold our action information, the FBGraphObject class has a lightweight
- // static method API that supports creating and comparing of objects that implement the
- // FBGraphObject protocol
- id<BOGGraphBooleanAction> action = (id<BOGGraphBooleanAction>)[FBGraphObject graphObject];
-
- // set the action's results and two truth-value objects, using inferred accessor methods
- // in our custom open graph action protocol
- action.result = result ? @"1" : @"0";
- action.truthvalue = [BOGFirstViewController ogObjectForTruthValue:left];
- action.anothertruthvalue = [BOGFirstViewController ogObjectForTruthValue:right];
-
-
- // post the action using one of the lightweight static start* methods on FBRequest
- [FBRequestConnection startForPostWithGraphPath:actionPath
- graphObject:action
- completionHandler:^(FBRequestConnection *connection, id requestResult, NSError *error) {
- if (!error) {
- // successful post, in the sample we do nothing with the id, however
- // a more complex application may want to store or perform addtional actions
- // with the id that represents the just-posted action
- } else {
- // See the Scrumptious sample for further error handling tips.
- // In this sample, we will simply retry permission errors.
- if (error.fberrorCategory == FBErrorCategoryPermissions && tryReauthIfNeeded) {
- // We got an error indicating a permission is missing. This could happen if the user has gone into
- // their Facebook settings and explictly removed a permission they had previously granted. Try reauthorizing
- // again to get the permission back.
- [FBSession.activeSession requestNewPublishPermissions:@[@"publish_actions"]
- defaultAudience:FBSessionDefaultAudienceFriends
- completionHandler:^(FBSession *session, NSError *error) {
- if (!error) {
- // re-call assuming we now have the permission
- [self postAction:actionPath
- leftOperand:left
- rightOperand:right
- result:result
- tryReauthIfNeeded:NO];
- }
- }];
- } else {
- UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"OG Post Failed"
- message:error.fberrorUserMessage ?: @"Unknown error"
- delegate:nil
- cancelButtonTitle:@"OK"
- otherButtonTitles:nil];
- [alert show];
- }
- }
- }];
- }
- }
-}
-
-// FBSample logic
-// Simple helper here to give us a readable string from a boolean value
-- (NSString*)stringForTruthValue:(BOOL)truthValue {
- return truthValue ? @"True" : @"False";
-}
-
-// FBSample logic
-// This is a helper function that returns an FBGraphObject representing a truth value, either true or false
-+ (id<BOGGraphTruthValue>)ogObjectForTruthValue:(BOOL)value {
-
- // NOTE! Production applications must host OG objects using a server provisioned for use by the app
- // These OG object URLs were created using the edit open graph feature of the graph tool
- // at https://developers.facebook.com/apps/
- NSString *trueURL = @"http://samples.ogp.me/369360019783304";
- NSString *falseURL = @"http://samples.ogp.me/369360256449947";
-
- // no need to create more than one of each TruthValue object, so we will store references here
- static id<BOGGraphTruthValue> trueObj = nil;
- static id<BOGGraphTruthValue> falseObj = nil;
-
- // return, and possibly create, the correct truth value
- if (value) {
- if (!trueObj) {
- trueObj = (id<BOGGraphTruthValue>)[FBGraphObject graphObject];
- trueObj.url = trueURL;
- }
- return trueObj;
- } else {
- if (!falseObj) {
- falseObj = (id<BOGGraphTruthValue>)[FBGraphObject graphObject];
- falseObj.url = falseURL;
- }
- return falseObj;
- }
-}
-
-@end
View
4,790 samples/BooleanOGSample/BooleanOGSample/en.lproj/BOGFirstViewController_iPad.xib
0 additions, 4,790 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
4,787 samples/BooleanOGSample/BooleanOGSample/en.lproj/BOGFirstViewController_iPhone.xib
0 additions, 4,787 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
BIN samples/BooleanOGSample/BooleanOGSample/first.png
Deleted file not rendered
View
BIN samples/BooleanOGSample/BooleanOGSample/first@2x.png
Deleted file not rendered
View
BIN samples/BooleanOGSample/BooleanOGSample/second.png
Deleted file not rendered
View
BIN samples/BooleanOGSample/BooleanOGSample/second@2x.png
Deleted file not rendered
View
25 samples/BooleanOGSample/ReadMe.txt
@@ -1,25 +0,0 @@
-Boolean OG sample
-
-This sample demonstrates use of the Facebook SDK to create and query Open Graph Actions. It consists of two views.
-The first view allows the user to post two different types of Open Graph Actions to their Timeline, depending on whether
-they ANDed or ORed two Boolean values. The second view allows the user to view a list of their friends who have also
-installed the BooleanOG app, select one of those friends, and retrieve a list of the actions that that friend has
-recently posted.
-
-It can serve as the basis for integrating Facebook into a real-world app that has multiple types of Open Graph actions
-and that allows a user to view their friends' recent app-related activity directly from within the app.
-
-Build Requirements
-iOS 4.0 SDK
-
-Runtime Requirements
-iPhone OS 4.0 or later
-
-Using the Sample
-Install the Facebook SDK for iOS.
-Launch the BooleanOGSample project using Xcode from the <Facebook SDK>/samples/BooleanOGSample directory.
-
-Changes from Previous Versions
-1.0 - First release.
-
-
View
18 samples/FriendPickerSample/FriendPickerSample.xcodeproj/project.pbxproj
@@ -16,6 +16,7 @@
85C69D7F1602B0AF008AD9A0 /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 85C69D7C1602B0AF008AD9A0 /* Default-568h@2x.png */; };
85C69D801602B0AF008AD9A0 /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = 85C69D7D1602B0AF008AD9A0 /* Default.png */; };
85C69D811602B0AF008AD9A0 /* Default@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 85C69D7E1602B0AF008AD9A0 /* Default@2x.png */; };
+ B59359D816D5642A000A63F0 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B59359D716D5642A000A63F0 /* Security.framework */; };
B9A4167916113EAE001E7A77 /* AdSupport.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B9A4167816113EAE001E7A77 /* AdSupport.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
DD37EA8615ABA4670015966B /* FacebookSDKResources.bundle in Resources */ = {isa = PBXBuildFile; fileRef = DD37EA8515ABA4670015966B /* FacebookSDKResources.bundle */; };
DD37EA8815ABA46B0015966B /* FacebookSDK.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DD37EA8715ABA46B0015966B /* FacebookSDK.framework */; };
@@ -40,6 +41,7 @@
85C69D7C1602B0AF008AD9A0 /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = "<group>"; };
85C69D7D1602B0AF008AD9A0 /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Default.png; sourceTree = "<group>"; };
85C69D7E1602B0AF008AD9A0 /* Default@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default@2x.png"; sourceTree = "<group>"; };
+ B59359D716D5642A000A63F0 /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = System/Library/Frameworks/Security.framework; sourceTree = SDKROOT; };
B9A4167816113EAE001E7A77 /* AdSupport.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AdSupport.framework; path = System/Library/Frameworks/AdSupport.framework; sourceTree = SDKROOT; };
DD37EA8515ABA4670015966B /* FacebookSDKResources.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; name = FacebookSDKResources.bundle; path = ../../build/FacebookSDK.framework/Versions/A/Resources/FacebookSDKResources.bundle; sourceTree = "<group>"; };
DD37EA8715ABA46B0015966B /* FacebookSDK.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = FacebookSDK.framework; path = ../../build/FacebookSDK.framework; sourceTree = "<group>"; };
@@ -64,6 +66,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
+ B59359D816D5642A000A63F0 /* Security.framework in Frameworks */,
85A928B91611462C008699F1 /* Social.framework in Frameworks */,
B9A4167916113EAE001E7A77 /* AdSupport.framework in Frameworks */,
84605AB315A77C2700197AA7 /* Accounts.framework in Frameworks */,
@@ -97,10 +100,11 @@
E2D6B81115413A570050835F /* Frameworks */ = {
isa = PBXGroup;
children = (
+ DD37EA8715ABA46B0015966B /* FacebookSDK.framework */,
+ B59359D716D5642A000A63F0 /* Security.framework */,
85A928B81611462C008699F1 /* Social.framework */,
B9A4167816113EAE001E7A77 /* AdSupport.framework */,
DD37EA8515ABA4670015966B /* FacebookSDKResources.bundle */,
- DD37EA8715ABA46B0015966B /* FacebookSDK.framework */,
84605AB215A77C2700197AA7 /* Accounts.framework */,
E2D6B81215413A570050835F /* UIKit.framework */,
E2D6B81415413A570050835F /* Foundation.framework */,
@@ -306,10 +310,10 @@
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "FriendPickerSample/FriendPickerSample-Prefix.pch";
INFOPLIST_FILE = "FriendPickerSample/FriendPickerSample-Info.plist";
- IPHONEOS_DEPLOYMENT_TARGET = 4.3;
+ IPHONEOS_DEPLOYMENT_TARGET = 5.0;
OTHER_LDFLAGS = (
- "-lsqlite3.0",
- "-ObjC",
+ "-lsqlite3.0",
+ "-ObjC",
);
PRODUCT_NAME = "$(TARGET_NAME)";
WRAPPER_EXTENSION = app;
@@ -326,10 +330,10 @@
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "FriendPickerSample/FriendPickerSample-Prefix.pch";
INFOPLIST_FILE = "FriendPickerSample/FriendPickerSample-Info.plist";
- IPHONEOS_DEPLOYMENT_TARGET = 4.3;
+ IPHONEOS_DEPLOYMENT_TARGET = 5.0;
OTHER_LDFLAGS = (
- "-lsqlite3.0",
- "-ObjC",
+ "-lsqlite3.0",
+ "-ObjC",
);
PRODUCT_NAME = "$(TARGET_NAME)";
WRAPPER_EXTENSION = app;
View
2 samples/FriendPickerSample/FriendPickerSample/FPAppDelegate.h
@@ -1,5 +1,5 @@
/*
- * Copyright 2012 Facebook
+ * Copyright 2010-present Facebook.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
View
8 samples/FriendPickerSample/FriendPickerSample/FPAppDelegate.m
@@ -1,5 +1,5 @@
/*
- * Copyright 2012 Facebook
+ * Copyright 2010-present Facebook.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -30,7 +30,11 @@ - (BOOL)application:(UIApplication *)application
openURL:(NSURL *)url
sourceApplication:(NSString *)sourceApplication
annotation:(id)annotation {
- return [FBSession.activeSession handleOpenURL:url];
+ return [FBAppCall handleOpenURL:url sourceApplication:sourceApplication];
+}
+
+- (void)applicationDidBecomeActive:(UIApplication *)application {
+ [FBAppCall handleDidBecomeActive];
}
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
View
2 samples/FriendPickerSample/FriendPickerSample/FPViewController.h
@@ -1,5 +1,5 @@
/*
- * Copyright 2012 Facebook
+ * Copyright 2010-present Facebook.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
View
55 samples/FriendPickerSample/FriendPickerSample/FPViewController.m
@@ -1,5 +1,5 @@
/*
- * Copyright 2012 Facebook
+ * Copyright 2010-present Facebook.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -39,30 +39,6 @@ @implementation FPViewController
- (void)viewDidLoad {
[super viewDidLoad];
-
- // FBSample logic
- // if the session is open, then load the data for our view controller
- if (!FBSession.activeSession.isOpen) {
- // if the session is closed, then we open it here, and establish a handler for state changes
- [FBSession.activeSession openWithCompletionHandler:^(FBSession *session,
- FBSessionState state,
- NSError *error) {
- switch (state) {
- case FBSessionStateClosedLoginFailed:
- {
- UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"Error"
- message:error.localizedDescription
- delegate:nil
- cancelButtonTitle:@"OK"
- otherButtonTitles:nil];
- [alertView show];
- }
- break;
- default:
- break;
- }
- }];
- }
}
- (void)viewDidUnload {
@@ -75,6 +51,29 @@ - (void)viewDidUnload {
#pragma mark UI handlers
- (IBAction)pickFriendsButtonClick:(id)sender {
+ // FBSample logic
+ // if the session is open, then load the data for our view controller
+ if (!FBSession.activeSession.isOpen) {
+ // if the session is closed, then we open it here, and establish a handler for state changes
+ [FBSession openActiveSessionWithReadPermissions:nil
+ allowLoginUI:YES
+ completionHandler:^(FBSession *session,
+ FBSessionState state,
+ NSError *error) {
+ if (error) {
+ UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"Error"
+ message:error.localizedDescription
+ delegate:nil
+ cancelButtonTitle:@"OK"
+ otherButtonTitles:nil];
+ [alertView show];
+ } else if (session.isOpen) {
+ [self pickFriendsButtonClick:sender];
+ }
+ }];
+ return;
+ }
+
if (self.friendPickerController == nil) {
// Create friend picker, and get data loaded into it.
self.friendPickerController = [[FBFriendPickerViewController alloc] init];
@@ -84,10 +83,8 @@ - (IBAction)pickFriendsButtonClick:(id)sender {
[self.friendPickerController loadData];
[self.friendPickerController clearSelection];
-
- // iOS 5.0+ apps should use [UIViewController presentViewController:animated:completion:]
- // rather than this deprecated method, but we want our samples to run on iOS 4.x as well.
- [self presentModalViewController:self.friendPickerController animated:YES];
+
+ [self presentViewController:self.friendPickerController animated:YES completion:nil];
}
- (void)facebookViewControllerDoneWasPressed:(id)sender {
View
2 samples/FriendPickerSample/FriendPickerSample/FriendPickerSample-Info.plist
@@ -53,6 +53,8 @@
<string>1.0</string>
<key>FacebookAppID</key>
<string>370546396320150</string>
+ <key>FacebookDisplayName</key>
+ <string>FriendPickerSample</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UIRequiredDeviceCapabilities</key>
View
2 samples/FriendPickerSample/FriendPickerSample/main.m
@@ -1,5 +1,5 @@
/*
- * Copyright 2012 Facebook
+ * Copyright 2010-present Facebook.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
View
10 samples/FriendPickerSample/ReadMe.txt
@@ -2,16 +2,6 @@ Friend Picker sample
Demonstrates how to use a FBFriendPickerViewController in the Facebook SDK for iOS.
-Build Requirements
-iOS 4.0 SDK
-
-Runtime Requirements
-iPhone OS 4.0 or later
-
Using the Sample
Install the Facebook SDK for iOS.
Launch the FriendPickerSample project using Xcode from the <Facebook SDK>/samples/FriendPickerSample directory.
-
-Changes from Previous Versions
-1.0 - First release.
-
View
10 samples/GraphApiSample/GraphApiSample.xcodeproj/project.pbxproj
@@ -16,6 +16,7 @@
85C69D691602B06E008AD9A0 /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 85C69D661602B06E008AD9A0 /* Default-568h@2x.png */; };
85C69D6A1602B06E008AD9A0 /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = 85C69D671602B06E008AD9A0 /* Default.png */; };
85C69D6B1602B06E008AD9A0 /* Default@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 85C69D681602B06E008AD9A0 /* Default@2x.png */; };
+ B59359DA16D56449000A63F0 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B59359D916D56449000A63F0 /* Security.framework */; };
B9A4168E16113EE7001E7A77 /* AdSupport.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B9A4168D16113EE7001E7A77 /* AdSupport.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
DDA290AD15ABA96200F533F9 /* FacebookSDK.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DDA290AC15ABA96200F533F9 /* FacebookSDK.framework */; };
E2511742152BB6FE00CB342A /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E2511741152BB6FE00CB342A /* UIKit.framework */; };
@@ -39,6 +40,7 @@
85C69D661602B06E008AD9A0 /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = "<group>"; };
85C69D671602B06E008AD9A0 /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Default.png; sourceTree = "<group>"; };
85C69D681602B06E008AD9A0 /* Default@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default@2x.png"; sourceTree = "<group>"; };
+ B59359D916D56449000A63F0 /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = System/Library/Frameworks/Security.framework; sourceTree = SDKROOT; };
B9A4168D16113EE7001E7A77 /* AdSupport.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AdSupport.framework; path = System/Library/Frameworks/AdSupport.framework; sourceTree = SDKROOT; };
DDA290AC15ABA96200F533F9 /* FacebookSDK.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = FacebookSDK.framework; path = ../../build/FacebookSDK.framework; sourceTree = "<group>"; };
E251173D152BB6FE00CB342A /* GraphApiSample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = GraphApiSample.app; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -62,6 +64,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
+ B59359DA16D56449000A63F0 /* Security.framework in Frameworks */,
85A928CE161146AC008699F1 /* Social.framework in Frameworks */,
B9A4168E16113EE7001E7A77 /* AdSupport.framework in Frameworks */,
84605AB015A77B8600197AA7 /* Accounts.framework in Frameworks */,
@@ -95,9 +98,10 @@
E2511740152BB6FE00CB342A /* Frameworks */ = {
isa = PBXGroup;
children = (
+ DDA290AC15ABA96200F533F9 /* FacebookSDK.framework */,
+ B59359D916D56449000A63F0 /* Security.framework */,
85A928CD161146AC008699F1 /* Social.framework */,
B9A4168D16113EE7001E7A77 /* AdSupport.framework */,
- DDA290AC15ABA96200F533F9 /* FacebookSDK.framework */,
84605AAF15A77B8600197AA7 /* Accounts.framework */,
E2511741152BB6FE00CB342A /* UIKit.framework */,
E2511743152BB6FE00CB342A /* Foundation.framework */,
@@ -302,7 +306,7 @@
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "GraphApiSample/GraphApiSample-Prefix.pch";
INFOPLIST_FILE = "$(SRCROOT)/GraphApiSample/GraphApiSample-Info.plist";
- IPHONEOS_DEPLOYMENT_TARGET = 4.3;
+ IPHONEOS_DEPLOYMENT_TARGET = 5.0;
OTHER_LDFLAGS = (
"-lsqlite3.0",
"-ObjC",
@@ -324,7 +328,7 @@
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "GraphApiSample/GraphApiSample-Prefix.pch";
INFOPLIST_FILE = "$(SRCROOT)/GraphApiSample/GraphApiSample-Info.plist";
- IPHONEOS_DEPLOYMENT_TARGET = 4.3;
+ IPHONEOS_DEPLOYMENT_TARGET = 5.0;
OTHER_LDFLAGS = (
"-lsqlite3.0",
"-ObjC",
View
2 samples/GraphApiSample/GraphApiSample/GraphApiAppDelegate.h
@@ -1,5 +1,5 @@
/*
- * Copyright 2012 Facebook
+ * Copyright 2010-present Facebook.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
View
9 samples/GraphApiSample/GraphApiSample/GraphApiAppDelegate.m
@@ -1,5 +1,5 @@
/*
- * Copyright 2012 Facebook
+ * Copyright 2010-present Facebook.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -46,7 +46,12 @@ - (BOOL)application:(UIApplication *)application
openURL:(NSURL *)url
sourceApplication:(NSString *)sourceApplication
annotation:(id)annotation {
- return [FBSession.activeSession handleOpenURL:url];
+ return [FBAppCall handleOpenURL:url
+ sourceApplication:sourceApplication];
+}
+
+- (void)applicationDidBecomeActive:(UIApplication *)application {
+ [FBAppCall handleDidBecomeActive];
}
// FBSample logic
View
2 samples/GraphApiSample/GraphApiSample/GraphApiSample-Info.plist
@@ -53,6 +53,8 @@
<string>1.0</string>
<key>FacebookAppID</key>
<string>307234779396415</string>
+ <key>FacebookDisplayName</key>
+ <string>GraphApiSample</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UIRequiredDeviceCapabilities</key>
View
2 samples/GraphApiSample/GraphApiSample/GraphApiViewController.h
@@ -1,5 +1,5 @@
/*
- * Copyright 2012 Facebook
+ * Copyright 2010-present Facebook.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
View
2 samples/GraphApiSample/GraphApiSample/GraphApiViewController.m
@@ -1,5 +1,5 @@
/*
- * Copyright 2012 Facebook
+ * Copyright 2010-present Facebook.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
View
2 samples/GraphApiSample/GraphApiSample/main.m
@@ -1,5 +1,5 @@
/*
- * Copyright 2012 Facebook
+ * Copyright 2010-present Facebook.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
View
11 samples/GraphApiSample/ReadMe.txt
@@ -2,17 +2,6 @@ Graph Api sample
Demonstrates the basics of how to make a singleton or batch request using the Facebook SDK for IOS.
-Build Requirements
-iOS 4.0 SDK
-
-Runtime Requirements
-iPhone OS 4.0 or later
-
Using the Sample
Install the Facebook SDK for iOS.
Launch the GraphApiSample project using Xcode from the <Facebook SDK>/samples/GraphApiSample directory.
-
-Changes from Previous Versions
-1.0 - First release.
-
-
View
441 samples/Hackbook/Hackbook.xcodeproj/project.pbxproj
@@ -1,441 +0,0 @@
-// !$*UTF8*$!
-{
- archiveVersion = 1;
- classes = {
- };
- objectVersion = 46;
- objects = {
-
-/* Begin PBXBuildFile section */
- 3018B43A13F9B94D00F61944 /* MainWindow-iPad.xib in Resources */ = {isa = PBXBuildFile; fileRef = 3018B43813F9B94D00F61944 /* MainWindow-iPad.xib */; };
- 3085CC291415D68A00456CCC /* MenuButton@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 3085CC281415D68A00456CCC /* MenuButton@2x.png */; };
- 30EA735E13F5D21B003DC0D2 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 30EA735D13F5D21B003DC0D2 /* UIKit.framework */; };
- 30EA736013F5D21B003DC0D2 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 30EA735F13F5D21B003DC0D2 /* Foundation.framework */; };
- 30EA736213F5D21B003DC0D2 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 30EA736113F5D21B003DC0D2 /* CoreGraphics.framework */; };
- 30EA736813F5D21B003DC0D2 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 30EA736613F5D21B003DC0D2 /* InfoPlist.strings */; };
- 30EA736B13F5D21B003DC0D2 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 30EA736A13F5D21B003DC0D2 /* main.m */; };
- 30EA736E13F5D21B003DC0D2 /* HackbookAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 30EA736D13F5D21B003DC0D2 /* HackbookAppDelegate.m */; };
- 30EA737113F5D21B003DC0D2 /* MainWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 30EA736F13F5D21B003DC0D2 /* MainWindow.xib */; };
- 30EA737413F5D21B003DC0D2 /* RootViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 30EA737313F5D21B003DC0D2 /* RootViewController.m */; };
- 30EA739813F5D372003DC0D2 /* APICallsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 30EA738E13F5D372003DC0D2 /* APICallsViewController.m */; };
- 30EA739A13F5D372003DC0D2 /* DataSet.m in Sources */ = {isa = PBXBuildFile; fileRef = 30EA739113F5D372003DC0D2 /* DataSet.m */; };
- 30EA739B13F5D372003DC0D2 /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = 30EA739213F5D372003DC0D2 /* Default.png */; };
- 30EA739C13F5D372003DC0D2 /* APIResultsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 30EA739413F5D372003DC0D2 /* APIResultsViewController.m */; };
- 30EA739F13F5D372003DC0D2 /* MenuButton.png in Resources */ = {isa = PBXBuildFile; fileRef = 30EA739713F5D372003DC0D2 /* MenuButton.png */; };
- 30EA73FC13F5D590003DC0D2 /* CoreLocation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 30EA73FB13F5D590003DC0D2 /* CoreLocation.framework */; };
- 30ED588C14358F8A00A226C3 /* Default@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 30ED588B14358F8A00A226C3 /* Default@2x.png */; };
- 84750AA0160A259400C1A13D /* Accounts.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84750A9F160A259400C1A13D /* Accounts.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
- 85A928C016114663008699F1 /* Social.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 85A928BF16114663008699F1 /* Social.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
- 85AFB4E4158F9C5B000AF7F5 /* Icon-72.png in Resources */ = {isa = PBXBuildFile; fileRef = 85AFB4E0158F9C5B000AF7F5 /* Icon-72.png */; };
- 85AFB4E5158F9C5B000AF7F5 /* Icon-72@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 85AFB4E1158F9C5B000AF7F5 /* Icon-72@2x.png */; };
- 85AFB4E6158F9C5B000AF7F5 /* Icon.png in Resources */ = {isa = PBXBuildFile; fileRef = 85AFB4E2158F9C5B000AF7F5 /* Icon.png */; };
- 85AFB4E7158F9C5B000AF7F5 /* Icon@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 85AFB4E3158F9C5B000AF7F5 /* Icon@2x.png */; };
- 85C69D561602AFD4008AD9A0 /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 85C69D551602AFD4008AD9A0 /* Default-568h@2x.png */; };
- B9A4168016113EC3001E7A77 /* AdSupport.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B9A4167F16113EC3001E7A77 /* AdSupport.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
- DD35C4BE15B9307600C0849B /* FBConnect.bundle in Resources */ = {isa = PBXBuildFile; fileRef = DD35C4BD15B9307600C0849B /* FBConnect.bundle */; };
- DD37EA8F15ABA4920015966B /* FacebookSDK.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DD37EA8E15ABA4920015966B /* FacebookSDK.framework */; };
-/* End PBXBuildFile section */
-
-/* Begin PBXFileReference section */
- 3018B43913F9B94D00F61944 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = "iPad/en.lproj/MainWindow-iPad.xib"; sourceTree = "<group>"; };
- 3085CC281415D68A00456CCC /* MenuButton@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "MenuButton@2x.png"; sourceTree = "<group>"; };
- 30EA735913F5D21B003DC0D2 /* Hackbook.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Hackbook.app; sourceTree = BUILT_PRODUCTS_DIR; };
- 30EA735D13F5D21B003DC0D2 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
- 30EA735F13F5D21B003DC0D2 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
- 30EA736113F5D21B003DC0D2 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
- 30EA736513F5D21B003DC0D2 /* Hackbook-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Hackbook-Info.plist"; sourceTree = "<group>"; };
- 30EA736713F5D21B003DC0D2 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
- 30EA736913F5D21B003DC0D2 /* Hackbook-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Hackbook-Prefix.pch"; sourceTree = "<group>"; };
- 30EA736A13F5D21B003DC0D2 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
- 30EA736C13F5D21B003DC0D2 /* HackbookAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HackbookAppDelegate.h; sourceTree = "<group>"; };
- 30EA736D13F5D21B003DC0D2 /* HackbookAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HackbookAppDelegate.m; sourceTree = "<group>"; };
- 30EA737013F5D21B003DC0D2 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/MainWindow.xib; sourceTree = "<group>"; };
- 30EA737213F5D21B003DC0D2 /* RootViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RootViewController.h; sourceTree = "<group>"; };
- 30EA737313F5D21B003DC0D2 /* RootViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RootViewController.m; sourceTree = "<group>"; };
- 30EA738D13F5D372003DC0D2 /* APICallsViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = APICallsViewController.h; sourceTree = "<group>"; };
- 30EA738E13F5D372003DC0D2 /* APICallsViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = APICallsViewController.m; sourceTree = "<group>"; };
- 30EA739013F5D372003DC0D2 /* DataSet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DataSet.h; sourceTree = "<group>"; };
- 30EA739113F5D372003DC0D2 /* DataSet.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DataSet.m; sourceTree = "<group>"; };
- 30EA739213F5D372003DC0D2 /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Default.png; sourceTree = "<group>"; };
- 30EA739313F5D372003DC0D2 /* APIResultsViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = APIResultsViewController.h; sourceTree = "<group>"; };
- 30EA739413F5D372003DC0D2 /* APIResultsViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = APIResultsViewController.m; sourceTree = "<group>"; };
- 30EA739713F5D372003DC0D2 /* MenuButton.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = MenuButton.png; sourceTree = "<group>"; };
- 30EA73FB13F5D590003DC0D2 /* CoreLocation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreLocation.framework; path = System/Library/Frameworks/CoreLocation.framework; sourceTree = SDKROOT; };
- 30ED588B14358F8A00A226C3 /* Default@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default@2x.png"; sourceTree = "<group>"; };
- 84750A9F160A259400C1A13D /* Accounts.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Accounts.framework; path = System/Library/Frameworks/Accounts.framework; sourceTree = SDKROOT; };
- 85A928BF16114663008699F1 /* Social.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Social.framework; path = System/Library/Frameworks/Social.framework; sourceTree = SDKROOT; };
- 85AFB4E0158F9C5B000AF7F5 /* Icon-72.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-72.png"; sourceTree = "<group>"; };
- 85AFB4E1158F9C5B000AF7F5 /* Icon-72@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-72@2x.png"; sourceTree = "<group>"; };
- 85AFB4E2158F9C5B000AF7F5 /* Icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Icon.png; sourceTree = "<group>"; };
- 85AFB4E3158F9C5B000AF7F5 /* Icon@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon@2x.png"; sourceTree = "<group>"; };
- 85C69D551602AFD4008AD9A0 /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = "<group>"; };
- B9A4167F16113EC3001E7A77 /* AdSupport.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AdSupport.framework; path = System/Library/Frameworks/AdSupport.framework; sourceTree = SDKROOT; };
- DD35C4BD15B9307600C0849B /* FBConnect.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; name = FBConnect.bundle; path = Hackbook/FBConnect.bundle; sourceTree = "<group>"; };
- DD37EA8E15ABA4920015966B /* FacebookSDK.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = FacebookSDK.framework; path = ../../build/FacebookSDK.framework; sourceTree = "<group>"; };
- DD37EA9815ABA8A90015966B /* Facebook.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = Facebook.h; path = ../../build/FacebookSDK.framework/Versions/A/DeprecatedHeaders/Facebook.h; sourceTree = "<group>"; };
- DD37EA9915ABA8A90015966B /* FacebookSDK.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = FacebookSDK.h; path = ../../build/FacebookSDK.framework/Versions/A/DeprecatedHeaders/FacebookSDK.h; sourceTree = "<group>"; };
- DD37EA9A15ABA8A90015966B /* FBCacheDescriptor.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = FBCacheDescriptor.h; path = ../../build/FacebookSDK.framework/Versions/A/DeprecatedHeaders/FBCacheDescriptor.h; sourceTree = "<group>"; };
- DD37EA9B15ABA8A90015966B /* FBConnect.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = FBConnect.h; path = ../../build/FacebookSDK.framework/Versions/A/DeprecatedHeaders/FBConnect.h; sourceTree = "<group>"; };
- DD37EA9D15ABA8A90015966B /* FBDialog.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = FBDialog.h; path = ../../build/FacebookSDK.framework/Versions/A/DeprecatedHeaders/FBDialog.h; sourceTree = "<group>"; };
- DD37EA9E15ABA8A90015966B /* FBError.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = FBError.h; path = ../../build/FacebookSDK.framework/Versions/A/DeprecatedHeaders/FBError.h; sourceTree = "<group>"; };
- DD37EA9F15ABA8A90015966B /* FBFrictionlessRequestSettings.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = FBFrictionlessRequestSettings.h; path = ../../build/FacebookSDK.framework/Versions/A/DeprecatedHeaders/FBFrictionlessRequestSettings.h; sourceTree = "<group>"; };
- DD37EAA015ABA8A90015966B /* FBFriendPickerViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = FBFriendPickerViewController.h; path = ../../build/FacebookSDK.framework/Versions/A/DeprecatedHeaders/FBFriendPickerViewController.h; sourceTree = "<group>"; };
- DD37EAA115ABA8A90015966B /* FBGraphLocation.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = FBGraphLocation.h; path = ../../build/FacebookSDK.framework/Versions/A/DeprecatedHeaders/FBGraphLocation.h; sourceTree = "<group>"; };
- DD37EAA215ABA8A90015966B /* FBGraphObject.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = FBGraphObject.h; path = ../../build/FacebookSDK.framework/Versions/A/DeprecatedHeaders/FBGraphObject.h; sourceTree = "<group>"; };
- DD37EAA515ABA8A90015966B /* FBGraphPlace.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = FBGraphPlace.h; path = ../../build/FacebookSDK.framework/Versions/A/DeprecatedHeaders/FBGraphPlace.h; sourceTree = "<group>"; };
- DD37EAA615ABA8A90015966B /* FBGraphUser.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = FBGraphUser.h; path = ../../build/FacebookSDK.framework/Versions/A/DeprecatedHeaders/FBGraphUser.h; sourceTree = "<group>"; };
- DD37EAA715ABA8A90015966B /* FBLoginDialog.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = FBLoginDialog.h; path = ../../build/FacebookSDK.framework/Versions/A/DeprecatedHeaders/FBLoginDialog.h; sourceTree = "<group>"; };
- DD37EAA815ABA8A90015966B /* FBOpenGraphAction.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = FBOpenGraphAction.h; path = ../../build/FacebookSDK.framework/Versions/A/DeprecatedHeaders/FBOpenGraphAction.h; sourceTree = "<group>"; };
- DD37EAA915ABA8A90015966B /* FBProfilePictureView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = FBProfilePictureView.h; path = ../../build/FacebookSDK.framework/Versions/A/DeprecatedHeaders/FBProfilePictureView.h; sourceTree = "<group>"; };
- DD37EAAA15ABA8A90015966B /* FBRequest.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = FBRequest.h; path = ../../build/FacebookSDK.framework/Versions/A/DeprecatedHeaders/FBRequest.h; sourceTree = "<group>"; };
- DD37EAAC15ABA8A90015966B /* FBRequestConnection.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = FBRequestConnection.h; path = ../../build/FacebookSDK.framework/Versions/A/DeprecatedHeaders/FBRequestConnection.h; sourceTree = "<group>"; };
- DD37EAAD15ABA8A90015966B /* FBSession.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = FBSession.h; path = ../../build/FacebookSDK.framework/Versions/A/DeprecatedHeaders/FBSession.h; sourceTree = "<group>"; };
- DD37EAAF15ABA8A90015966B /* FBSessionManualTokenCachingStrategy.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = FBSessionManualTokenCachingStrategy.h; path = ../../build/FacebookSDK.framework/Versions/A/DeprecatedHeaders/FBSessionManualTokenCachingStrategy.h; sourceTree = "<group>"; };
- DD37EAB015ABA8A90015966B /* FBSessionTokenCachingStrategy.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = FBSessionTokenCachingStrategy.h; path = ../../build/FacebookSDK.framework/Versions/A/DeprecatedHeaders/FBSessionTokenCachingStrategy.h; sourceTree = "<group>"; };
-/* End PBXFileReference section */
-
-/* Begin PBXFrameworksBuildPhase section */
- 30EA735613F5D21B003DC0D2 /* Frameworks */ = {
- isa = PBXFrameworksBuildPhase;
- buildActionMask = 2147483647;
- files = (
- 85A928C016114663008699F1 /* Social.framework in Frameworks */,
- B9A4168016113EC3001E7A77 /* AdSupport.framework in Frameworks */,
- 84750AA0160A259400C1A13D /* Accounts.framework in Frameworks */,
- 30EA73FC13F5D590003DC0D2 /* CoreLocation.framework in Frameworks */,
- 30EA735E13F5D21B003DC0D2 /* UIKit.framework in Frameworks */,
- 30EA736013F5D21B003DC0D2 /* Foundation.framework in Frameworks */,
- 30EA736213F5D21B003DC0D2 /* CoreGraphics.framework in Frameworks */,
- DD37EA8F15ABA4920015966B /* FacebookSDK.framework in Frameworks */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXFrameworksBuildPhase section */
-
-/* Begin PBXGroup section */
- 3018B43713F9B94B00F61944 /* iPad */ = {
- isa = PBXGroup;
- children = (
- 3018B43813F9B94D00F61944 /* MainWindow-iPad.xib */,
- );
- name = iPad;
- sourceTree = "<group>";
- };
- 30EA734E13F5D21B003DC0D2 = {
- isa = PBXGroup;
- children = (
- 30EA73CC13F5D50D003DC0D2 /* FBConnect */,
- 30EA736313F5D21B003DC0D2 /* Hackbook */,
- 30EA735C13F5D21B003DC0D2 /* Frameworks */,
- 30EA735A13F5D21B003DC0D2 /* Products */,
- );
- sourceTree = "<group>";
- };
- 30EA735A13F5D21B003DC0D2 /* Products */ = {
- isa = PBXGroup;
- children = (
- 30EA735913F5D21B003DC0D2 /* Hackbook.app */,
- );
- name = Products;
- sourceTree = "<group>";
- };
- 30EA735C13F5D21B003DC0D2 /* Frameworks */ = {
- isa = PBXGroup;
- children = (
- 85A928BF16114663008699F1 /* Social.framework */,
- B9A4167F16113EC3001E7A77 /* AdSupport.framework */,
- 84750A9F160A259400C1A13D /* Accounts.framework */,
- DD37EA8E15ABA4920015966B /* FacebookSDK.framework */,
- 30EA73FB13F5D590003DC0D2 /* CoreLocation.framework */,
- 30EA735D13F5D21B003DC0D2 /* UIKit.framework */,
- 30EA735F13F5D21B003DC0D2 /* Foundation.framework */,
- 30EA736113F5D21B003DC0D2 /* CoreGraphics.framework */,
- );
- name = Frameworks;
- sourceTree = "<group>";
- };
- 30EA736313F5D21B003DC0D2 /* Hackbook */ = {
- isa = PBXGroup;
- children = (
- 3018B43713F9B94B00F61944 /* iPad */,
- 30EA736C13F5D21B003DC0D2 /* HackbookAppDelegate.h */,
- 30EA736D13F5D21B003DC0D2 /* HackbookAppDelegate.m */,
- 30EA736F13F5D21B003DC0D2 /* MainWindow.xib */,
- 30EA737213F5D21B003DC0D2 /* RootViewController.h */,
- 30EA737313F5D21B003DC0D2 /* RootViewController.m */,
- 30EA738D13F5D372003DC0D2 /* APICallsViewController.h */,
- 30EA738E13F5D372003DC0D2 /* APICallsViewController.m */,
- 30EA739313F5D372003DC0D2 /* APIResultsViewController.h */,
- 30EA739413F5D372003DC0D2 /* APIResultsViewController.m */,
- 30EA739013F5D372003DC0D2 /* DataSet.h */,
- 30EA739113F5D372003DC0D2 /* DataSet.m */,
- 30EA736413F5D21B003DC0D2 /* Supporting Files */,
- );
- path = Hackbook;
- sourceTree = "<group>";
- };
- 30EA736413F5D21B003DC0D2 /* Supporting Files */ = {
- isa = PBXGroup;
- children = (
- 85AFB4E0158F9C5B000AF7F5 /* Icon-72.png */,
- 85AFB4E1158F9C5B000AF7F5 /* Icon-72@2x.png */,
- 85AFB4E2158F9C5B000AF7F5 /* Icon.png */,
- 85AFB4E3158F9C5B000AF7F5 /* Icon@2x.png */,
- 30EA739213F5D372003DC0D2 /* Default.png */,
- 30ED588B14358F8A00A226C3 /* Default@2x.png */,
- 85C69D551602AFD4008AD9A0 /* Default-568h@2x.png */,
- 30EA739713F5D372003DC0D2 /* MenuButton.png */,
- 3085CC281415D68A00456CCC /* MenuButton@2x.png */,
- 30EA736513F5D21B003DC0D2 /* Hackbook-Info.plist */,
- 30EA736613F5D21B003DC0D2 /* InfoPlist.strings */,
- 30EA736913F5D21B003DC0D2 /* Hackbook-Prefix.pch */,
- 30EA736A13F5D21B003DC0D2 /* main.m */,
- );
- name = "Supporting Files";
- sourceTree = "<group>";
- };
- 30EA73CC13F5D50D003DC0D2 /* FBConnect */ = {
- isa = PBXGroup;
- children = (
- DD37EA9815ABA8A90015966B /* Facebook.h */,
- DD37EA9915ABA8A90015966B /* FacebookSDK.h */,
- DD37EA9A15ABA8A90015966B /* FBCacheDescriptor.h */,
- DD37EA9B15ABA8A90015966B /* FBConnect.h */,
- DD37EA9D15ABA8A90015966B /* FBDialog.h */,
- DD37EA9E15ABA8A90015966B /* FBError.h */,
- DD37EA9F15ABA8A90015966B /* FBFrictionlessRequestSettings.h */,
- DD37EAA015ABA8A90015966B /* FBFriendPickerViewController.h */,
- DD37EAA115ABA8A90015966B /* FBGraphLocation.h */,
- DD37EAA215ABA8A90015966B /* FBGraphObject.h */,
- DD37EAA515ABA8A90015966B /* FBGraphPlace.h */,
- DD37EAA615ABA8A90015966B /* FBGraphUser.h */,
- DD37EAA715ABA8A90015966B /* FBLoginDialog.h */,
- DD37EAA815ABA8A90015966B /* FBOpenGraphAction.h */,
- DD37EAA915ABA8A90015966B /* FBProfilePictureView.h */,
- DD37EAAA15ABA8A90015966B /* FBRequest.h */,
- DD37EAAC15ABA8A90015966B /* FBRequestConnection.h */,
- DD37EAAD15ABA8A90015966B /* FBSession.h */,
- DD37EAAF15ABA8A90015966B /* FBSessionManualTokenCachingStrategy.h */,
- DD37EAB015ABA8A90015966B /* FBSessionTokenCachingStrategy.h */,
- DD35C4BD15B9307600C0849B /* FBConnect.bundle */,
- );
- name = FBConnect;
- sourceTree = "<group>";
- };
-/* End PBXGroup section */
-
-/* Begin PBXNativeTarget section */
- 30EA735813F5D21B003DC0D2 /* Hackbook */ = {
- isa = PBXNativeTarget;
- buildConfigurationList = 30EA737A13F5D21B003DC0D2 /* Build configuration list for PBXNativeTarget "Hackbook" */;
- buildPhases = (
- 30EA735513F5D21B003DC0D2 /* Sources */,
- 30EA735613F5D21B003DC0D2 /* Frameworks */,
- 30EA735713F5D21B003DC0D2 /* Resources */,
- );
- buildRules = (
- );
- dependencies = (
- );
- name = Hackbook;
- productName = Hackbook;
- productReference = 30EA735913F5D21B003DC0D2 /* Hackbook.app */;
- productType = "com.apple.product-type.application";
- };
-/* End PBXNativeTarget section */
-
-/* Begin PBXProject section */
- 30EA735013F5D21B003DC0D2 /* Project object */ = {
- isa = PBXProject;
- attributes = {
- LastUpgradeCheck = 0420;
- };
- buildConfigurationList = 30EA735313F5D21B003DC0D2 /* Build configuration list for PBXProject "Hackbook" */;
- compatibilityVersion = "Xcode 3.2";
- developmentRegion = English;
- hasScannedForEncodings = 0;
- knownRegions = (
- en,
- );
- mainGroup = 30EA734E13F5D21B003DC0D2;
- productRefGroup = 30EA735A13F5D21B003DC0D2 /* Products */;
- projectDirPath = "";
- projectRoot = "";
- targets = (
- 30EA735813F5D21B003DC0D2 /* Hackbook */,
- );
- };
-/* End PBXProject section */
-
-/* Begin PBXResourcesBuildPhase section */
- 30EA735713F5D21B003DC0D2 /* Resources */ = {
- isa = PBXResourcesBuildPhase;
- buildActionMask = 2147483647;
- files = (
- 30EA736813F5D21B003DC0D2 /* InfoPlist.strings in Resources */,
- 30EA737113F5D21B003DC0D2 /* MainWindow.xib in Resources */,
- 30EA739B13F5D372003DC0D2 /* Default.png in Resources */,
- 30EA739F13F5D372003DC0D2 /* MenuButton.png in Resources */,
- 3018B43A13F9B94D00F61944 /* MainWindow-iPad.xib in Resources */,
- 3085CC291415D68A00456CCC /* MenuButton@2x.png in Resources */,
- 30ED588C14358F8A00A226C3 /* Default@2x.png in Resources */,
- 85AFB4E4158F9C5B000AF7F5 /* Icon-72.png in Resources */,
- 85AFB4E5158F9C5B000AF7F5 /* Icon-72@2x.png in Resources */,
- 85AFB4E6158F9C5B000AF7F5 /* Icon.png in Resources */,
- 85AFB4E7158F9C5B000AF7F5 /* Icon@2x.png in Resources */,
- DD35C4BE15B9307600C0849B /* FBConnect.bundle in Resources */,
- 85C69D561602AFD4008AD9A0 /* Default-568h@2x.png in Resources */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXResourcesBuildPhase section */
-
-/* Begin PBXSourcesBuildPhase section */
- 30EA735513F5D21B003DC0D2 /* Sources */ = {
- isa = PBXSourcesBuildPhase;
- buildActionMask = 2147483647;
- files = (
- 30EA736B13F5D21B003DC0D2 /* main.m in Sources */,
- 30EA736E13F5D21B003DC0D2 /* HackbookAppDelegate.m in Sources */,
- 30EA737413F5D21B003DC0D2 /* RootViewController.m in Sources */,
- 30EA739813F5D372003DC0D2 /* APICallsViewController.m in Sources */,
- 30EA739A13F5D372003DC0D2 /* DataSet.m in Sources */,
- 30EA739C13F5D372003DC0D2 /* APIResultsViewController.m in Sources */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXSourcesBuildPhase section */
-
-/* Begin PBXVariantGroup section */
- 3018B43813F9B94D00F61944 /* MainWindow-iPad.xib */ = {
- isa = PBXVariantGroup;
- children = (
- 3018B43913F9B94D00F61944 /* en */,
- );
- name = "MainWindow-iPad.xib";
- sourceTree = "<group>";
- };
- 30EA736613F5D21B003DC0D2 /* InfoPlist.strings */ = {
- isa = PBXVariantGroup;
- children = (
- 30EA736713F5D21B003DC0D2 /* en */,
- );
- name = InfoPlist.strings;
- sourceTree = "<group>";
- };
- 30EA736F13F5D21B003DC0D2 /* MainWindow.xib */ = {
- isa = PBXVariantGroup;
- children = (
- 30EA737013F5D21B003DC0D2 /* en */,
- );
- name = MainWindow.xib;
- sourceTree = "<group>";
- };
-/* End PBXVariantGroup section */
-
-/* Begin XCBuildConfiguration section */
- 30EA737813F5D21B003DC0D2 /* Debug */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- ARCHS = "$(ARCHS_STANDARD_32_BIT)";
- "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
- GCC_C_LANGUAGE_STANDARD = gnu99;
- GCC_OPTIMIZATION_LEVEL = 0;
- GCC_PREPROCESSOR_DEFINITIONS = DEBUG;
- GCC_SYMBOLS_PRIVATE_EXTERN = NO;
- GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
- GCC_WARN_ABOUT_RETURN_TYPE = YES;
- GCC_WARN_UNUSED_VARIABLE = YES;
- IPHONEOS_DEPLOYMENT_TARGET = 4.0;
- SDKROOT = iphoneos;
- };
- name = Debug;
- };
- 30EA737913F5D21B003DC0D2 /* Release */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- ARCHS = "$(ARCHS_STANDARD_32_BIT)";
- "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
- GCC_C_LANGUAGE_STANDARD = gnu99;
- GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
- GCC_WARN_ABOUT_RETURN_TYPE = YES;
- GCC_WARN_UNUSED_VARIABLE = YES;
- IPHONEOS_DEPLOYMENT_TARGET = 4.0;
- OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1";
- SDKROOT = iphoneos;
- };
- name = Release;
- };
- 30EA737B13F5D21B003DC0D2 /* Debug */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- ALWAYS_SEARCH_USER_PATHS = NO;
- COPY_PHASE_STRIP = NO;
- FRAMEWORK_SEARCH_PATHS = (
- "$(inherited)",
- "\"$(SRCROOT)/../../build\"",
- );
- GCC_DYNAMIC_NO_PIC = NO;
- GCC_PRECOMPILE_PREFIX_HEADER = YES;
- GCC_PREFIX_HEADER = "Hackbook/Hackbook-Prefix.pch";
- INFOPLIST_FILE = "Hackbook/Hackbook-Info.plist";
- IPHONEOS_DEPLOYMENT_TARGET = 4.0;
- OTHER_LDFLAGS = (
- "-lsqlite3.0",
- "-ObjC",
- );
- PRODUCT_NAME = Hackbook;
- TARGETED_DEVICE_FAMILY = "1,2";
- WRAPPER_EXTENSION = app;
- };
- name = Debug;
- };
- 30EA737C13F5D21B003DC0D2 /* Release */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- ALWAYS_SEARCH_USER_PATHS = NO;
- COPY_PHASE_STRIP = YES;
- FRAMEWORK_SEARCH_PATHS = (
- "$(inherited)",
- "\"$(SRCROOT)/../../build\"",
- );
- GCC_PRECOMPILE_PREFIX_HEADER = YES;
- GCC_PREFIX_HEADER = "Hackbook/Hackbook-Prefix.pch";
- INFOPLIST_FILE = "Hackbook/Hackbook-Info.plist";
- IPHONEOS_DEPLOYMENT_TARGET = 4.0;
- OTHER_LDFLAGS = (
- "-lsqlite3.0",
- "-ObjC",
- );
- PRODUCT_NAME = Hackbook;
- TARGETED_DEVICE_FAMILY = "1,2";
- VALIDATE_PRODUCT = YES;
- WRAPPER_EXTENSION = app;
- };
- name = Release;
- };
-/* End XCBuildConfiguration section */
-
-/* Begin XCConfigurationList section */
- 30EA735313F5D21B003DC0D2 /* Build configuration list for PBXProject "Hackbook" */ = {
- isa = XCConfigurationList;
- buildConfigurations = (
- 30EA737813F5D21B003DC0D2 /* Debug */,
- 30EA737913F5D21B003DC0D2 /* Release */,
- );
- defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Release;
- };
- 30EA737A13F5D21B003DC0D2 /* Build configuration list for PBXNativeTarget "Hackbook" */ = {
- isa = XCConfigurationList;
- buildConfigurations = (
- 30EA737B13F5D21B003DC0D2 /* Debug */,
- 30EA737C13F5D21B003DC0D2 /* Release */,
- );
- defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Release;
- };
-/* End XCConfigurationList section */
- };
- rootObject = 30EA735013F5D21B003DC0D2 /* Project object */;
-}
View
82 samples/Hackbook/Hackbook/APICallsViewController.h
@@ -1,82 +0,0 @@
-/*
- * Copyright 2010 Facebook
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#import <UIKit/UIKit.h>
-#import "FBConnect.h"
-#import <CoreLocation/CoreLocation.h>
-
-typedef enum apiCall {
- kAPILogout,
- kAPIGraphUserPermissionsDelete,
- kDialogPermissionsExtended,
- kDialogRequestsSendToMany,
- kAPIGetAppUsersFriendsNotUsing,
- kAPIGetAppUsersFriendsUsing,
- kAPIFriendsForDialogRequests,
- kDialogRequestsSendToSelect,
- kAPIFriendsForTargetDialogRequests,
- kDialogRequestsSendToTarget,
- kDialogFeedUser,
- kAPIFriendsForDialogFeed,
- kDialogFeedFriend,
- kAPIGraphUserPermissions,
- kAPIGraphMe,
- kAPIGraphUserFriends,
- kDialogPermissionsCheckin,
- kDialogPermissionsCheckinForRecent,
- kDialogPermissionsCheckinForPlaces,
- kAPIGraphSearchPlace,
- kAPIGraphUserCheckins,
- kAPIGraphUserPhotosPost,
- kAPIGraphUserVideosPost,
-} apiCall;
-
-@interface APICallsViewController : UIViewController
-<FBRequestDelegate,
-FBDialogDelegate,
-UITableViewDataSource,
-UITableViewDelegate,
-CLLocationManagerDelegate>{
- int currentAPICall;
- NSUInteger childIndex;
- UITableView *apiTableView;
- NSMutableArray *apiMenuItems;
- NSString *apiHeader;
- NSMutableArray *savedAPIResult;
- CLLocationManager *locationManager;
- CLLocation *mostRecentLocation;
- UIActivityIndicatorView *activityIndicator;
- UILabel *messageLabel;
- UIView *messageView;
-}
-
-@property (nonatomic, retain) UITableView *apiTableView;
-@property (nonatomic, retain) NSMutableArray *apiMenuItems;
-@property (nonatomic, retain) NSString *apiHeader;
-@property (nonatomic, retain) NSMutableArray *savedAPIResult;
-@property (nonatomic, retain) CLLocationManager *locationManager;
-@property (nonatomic, retain) CLLocation *mostRecentLocation;
-@property (nonatomic, retain) UIActivityIndicatorView *activityIndicator;
-@property (nonatomic, retain) UILabel *messageLabel;
-@property (nonatomic, retain) UIView *messageView;
-
-- (id)initWithIndex:(NSUInteger)index;
-
-- (void)userDidGrantPermission;
-
-- (void)userDidNotGrantPermission;
-
-@end
View
1,269 samples/Hackbook/Hackbook/APICallsViewController.m
@@ -1,1269 +0,0 @@
-/*
- * Copyright 2010 Facebook
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#import "APICallsViewController.h"
-#import "HackbookAppDelegate.h"
-#import "FBConnect.h"
-#import "DataSet.h"
-#import "APIResultsViewController.h"
-#import "RootViewController.h"
-
-// For re-using table cells
-#define TITLE_TAG 1001
-#define DESCRIPTION_TAG 1002
-
-@implementation APICallsViewController
-
-@synthesize apiTableView;
-@synthesize apiMenuItems;
-@synthesize apiHeader;
-@synthesize savedAPIResult;
-@synthesize locationManager;
-@synthesize mostRecentLocation;
-@synthesize activityIndicator;
-@synthesize messageLabel;
-@synthesize messageView;
-
-- (id)initWithIndex:(NSUInteger)index {
- self = [super init];
- if (self) {
- childIndex = index;
- savedAPIResult = [[NSMutableArray alloc] initWithCapacity:1];
- }
- return self;
-}
-
-- (void)dealloc {
- [apiTableView release];
- [apiMenuItems release];
- [apiHeader release];
- [savedAPIResult release];
-
- [locationManager stopUpdatingLocation];
- locationManager.delegate = nil;
- [locationManager release];
-
- [mostRecentLocation release];
- [activityIndicator release];
- [messageLabel release];
- [messageView release];
-
- [super dealloc];
-}
-
-- (void)didReceiveMemoryWarning {
- // Releases the view if it doesn't have a superview.
- [super didReceiveMemoryWarning];
-
- // Release any cached data, images, etc that aren't in use.
-}
-
-#pragma mark - View lifecycle
-
-- (void)loadView {
- UIView *view = [[UIView alloc] initWithFrame:[UIScreen
- mainScreen].applicationFrame];
- [view setBackgroundColor:[UIColor whiteColor]];
- self.view = view;
- [view release];
-
- HackbookAppDelegate *delegate = (HackbookAppDelegate *)[[UIApplication sharedApplication] delegate];
- NSDictionary *apiData = [[[delegate apiData] apiConfigData] objectAtIndex:childIndex];
- self.navigationItem.title = [apiData objectForKey:@"title"];
- apiMenuItems = [[NSArray arrayWithArray:[apiData objectForKey:@"menu"]] retain];
- apiHeader = [[apiData objectForKey:@"description"] retain];
-
- self.navigationItem.backBarButtonItem =
- [[[UIBarButtonItem alloc] initWithTitle:@"Back"
- style:UIBarButtonItemStyleBordered
- target:nil
- action:nil] autorelease];
-
- // Main Menu Table
- apiTableView = [[UITableView alloc] initWithFrame:self.view.bounds
- style:UITableViewStylePlain];
- [apiTableView setBackgroundColor:[UIColor whiteColor]];
- apiTableView.dataSource = self;
- apiTableView.delegate = self;
- apiTableView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
- [self.view addSubview:apiTableView];
-
- // Activity Indicator
- int xPosition = (self.view.bounds.size.width / 2.0) - 15.0;
- int yPosition = (self.view.bounds.size.height / 2.0) - 15.0;
- activityIndicator = [[UIActivityIndicatorView alloc] initWithFrame:CGRectMake(xPosition, yPosition, 30, 30)];
- activityIndicator.activityIndicatorViewStyle = UIActivityIndicatorViewStyleGray;
- [self.view addSubview:activityIndicator];
-
- // Message Label for showing confirmation and status messages
- CGFloat yLabelViewOffset = self.view.bounds.size.height-self.navigationController.navigationBar.frame.size.height-30;
- messageView = [[UIView alloc]
- initWithFrame:CGRectMake(0, yLabelViewOffset, self.view.bounds.size.width, 30)];
- messageView.backgroundColor = [UIColor lightGrayColor];
-
- UIView *messageInsetView = [[UIView alloc] initWithFrame:CGRectMake(1, 1, self.view.bounds.size.width-1, 28)];
- messageInsetView.backgroundColor = [UIColor colorWithRed:255.0/255.0
- green:248.0/255.0
- blue:228.0/255.0
- alpha:1];
- messageLabel = [[UILabel alloc]
- initWithFrame:CGRectMake(4, 1, self.view.bounds.size.width-10, 26)];
- messageLabel.text = @"";
- messageLabel.font = [UIFont fontWithName:@"Helvetica" size:14.0];
- messageLabel.backgroundColor = [UIColor colorWithRed:255.0/255.0
- green:248.0/255.0
- blue:228.0/255.0
- alpha:0.6];
- [messageInsetView addSubview:messageLabel];
- [messageView addSubview:messageInsetView];
- [messageInsetView release];
- messageView.hidden = YES;
- [self.view addSubview:messageView];
-}
-
-- (void)viewDidUnload {
- [super viewDidUnload];
- // Release any retained subviews of the main view.
- // e.g. self.myOutlet = nil;
-}
-
-- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
- return YES;
-}
-
-#pragma mark - Private Helper Methods
-/*
- * This method is called to store the check-in permissions
- * in the app session after the permissions have been updated.
- */
-- (void)updateCheckinPermissions {
- HackbookAppDelegate *delegate = (HackbookAppDelegate *)[[UIApplication sharedApplication] delegate];
- [[delegate userPermissions] setObject:@"1" forKey:@"user_checkins"];
- [[delegate userPermissions] setObject:@"1" forKey:@"publish_checkins"];
-}
-
-/*
- * This method shows the activity indicator and
- * deactivates the table to avoid user input.
- */
-- (void)showActivityIndicator {
- if (![activityIndicator isAnimating]) {
- apiTableView.userInteractionEnabled = NO;
- [activityIndicator startAnimating];
- }
-}
-
-/*
- * This method hides the activity indicator
- * and enables user interaction once more.
- */
-- (void)hideActivityIndicator {
- if ([activityIndicator isAnimating]) {
- [activityIndicator stopAnimating];
- apiTableView.userInteractionEnabled = YES;
- }
-}
-
-/*
- * This method is used to display API confirmation and
- * error messages to the user.
- */
-- (void)showMessage:(NSString *)message {
- CGRect labelFrame = messageView.frame;
- labelFrame.origin.y = [UIScreen mainScreen].bounds.size.height - self.navigationController.navigationBar.frame.size.height - 20;
- messageView.frame = labelFrame;
- messageLabel.text = message;
- messageView.hidden = NO;
-
- // Use animation to show the message from the bottom then
- // hide it.
- [UIView animateWithDuration:0.5
- delay:1.0
- options: UIViewAnimationCurveEaseOut
- animations:^{
- CGRect labelFrame = messageView.frame;
- labelFrame.origin.y -= labelFrame.size.height;
- messageView.frame = labelFrame;
- }
- completion:^(BOOL finished){
- if (finished) {
- [UIView animateWithDuration:0.5
- delay:3.0
- options: UIViewAnimationCurveEaseOut
- animations:^{
- CGRect labelFrame = messageView.frame;
- labelFrame.origin.y += messageView.frame.size.height;
- messageView.frame = labelFrame;
- }
- completion:^(BOOL finished){
- if (finished) {
- messageView.hidden = YES;
- messageLabel.text = @"";
- }
- }];
- }
- }];
-}
-
-/*
- * This method hides the message, only needed if view closed
- * and animation still going on.
- */
-- (void)hideMessage {
- messageView.hidden = YES;
- messageLabel.text = @"";
-}
-
-/*
- * This method handles any clean up needed if the view
- * is about to disappear.
- */
-- (void)viewWillDisappear:(BOOL)animated {
- [super viewWillDisappear:animated];
- // Hide the activitiy indicator
- [self hideActivityIndicator];
- // Hide the message.
- [self hideMessage];
-}
-
-/**
- * Helper method called when a button is clicked
- */
-- (void)apiButtonClicked:(id)sender {
- // Each menu button in the UITableViewController is initialized
- // with a tag representing the table cell row. When the button
- // is clicked the button is passed along in the sender object.
- // From this object we can then read the tag property to determine
- // which menu button was clicked.
- SEL selector = NSSelectorFromString([[apiMenuItems objectAtIndex:[sender tag]] objectForKey:@"method"]);
- if ([self respondsToSelector:selector]) {
- [self performSelector:selector];
- }
-}
-
-/**
- * Helper method to parse URL query parameters
- */
-- (NSDictionary *)parseURLParams:(NSString *)query {
- NSArray *pairs = [query componentsSeparatedByString:@"&"];
- NSMutableDictionary *params = [[[NSMutableDictionary alloc] init] autorelease];
- for (NSString *pair in pairs) {
- NSArray *kv = [pair componentsSeparatedByString:@"="];
-
- [params setObject:[[kv objectAtIndex:1] stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding]
- forKey:[[kv objectAtIndex:0] stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding]];
- }
- return params;
-}
-
-#pragma mark - Facebook API Calls
-/*
- * Graph API: Method to get the user's friends.
- */
-- (void)apiGraphFriends {
- [self showActivityIndicator];
- // Do not set current API as this is commonly called by other methods
- HackbookAppDelegate *delegate = (HackbookAppDelegate *)[[UIApplication sharedApplication] delegate];
- [[delegate facebook] requestWithGraphPath:@"me/friends" andDelegate:self];
-}
-
-/*
- * Graph API: Method to get the user's permissions for this app.
- */
-- (void)apiGraphUserPermissions {
- [self showActivityIndicator];
- currentAPICall = kAPIGraphUserPermissions;
- HackbookAppDelegate *delegate = (HackbookAppDelegate *)[[UIApplication sharedApplication] delegate];
- [[delegate facebook] requestWithGraphPath:@"me/permissions" andDelegate:self];
-}
-
-/*
- * Dialog: Authorization to grant the app check-in permissions.
- */
-- (void)apiPromptCheckinPermissions {
- HackbookAppDelegate *delegate = (HackbookAppDelegate *)[[UIApplication sharedApplication] delegate];
- NSArray *checkinPermissions = [[NSArray alloc] initWithObjects:@"user_checkins", @"publish_checkins", nil];
- [[delegate facebook] authorize:checkinPermissions];
- [checkinPermissions release];
-}
-
-/*
- * --------------------------------------------------------------------------
- * Login and Permissions
- * --------------------------------------------------------------------------
- */
-
-/*
- * iOS SDK method that handles the logout API call and flow.
- */
-- (void)apiLogout {
- currentAPICall = kAPILogout;
- HackbookAppDelegate *delegate = (HackbookAppDelegate *)[[UIApplication sharedApplication] delegate];
- [[delegate facebook] logout];
-}
-
-/*
- * Graph API: App unauthorize
- */
-- (void)apiGraphUserPermissionsDelete {
- [self showActivityIndicator];
- currentAPICall = kAPIGraphUserPermissionsDelete;
- HackbookAppDelegate *delegate = (HackbookAppDelegate *)[[UIApplication sharedApplication] delegate];
- // Passing empty (no) parameters unauthorizes the entire app. To revoke individual permissions
- // add a permission parameter with the name of the permission to revoke.
- NSMutableDictionary *params = [NSMutableDictionary dictionaryWithObjectsAndKeys:nil];
- [[delegate facebook] requestWithGraphPath:@"me/permissions"
- andParams:params
- andHttpMethod:@"DELETE"
- andDelegate:self];
-}
-
-/*
- * Dialog: Authorization to grant the app user_likes permission.
- */
-- (void)apiPromptExtendedPermissions {
- currentAPICall = kDialogPermissionsExtended;
- HackbookAppDelegate *delegate = (HackbookAppDelegate *)[[UIApplication sharedApplication] delegate];
- NSArray *extendedPermissions = [[NSArray alloc] initWithObjects:@"user_likes", nil];
- [[delegate facebook] authorize:extendedPermissions];
- [extendedPermissions release];
-}
-
-/**
- * --------------------------------------------------------------------------
- * News Feed
- * --------------------------------------------------------------------------
- */
-
-/*
- * Dialog: Feed for the user
- */
-- (void)apiDialogFeedUser {
- currentAPICall = kDialogFeedUser;
- FBSBJSON *jsonWriter = [[FBSBJSON new] autorelease];
-
- // The action links to be shown with the post in the feed
- NSArray* actionLinks = [NSArray arrayWithObjects:[NSDictionary dictionaryWithObjectsAndKeys:
- @"Get Started",@"name",@"http://m.facebook.com/apps/hackbookios/