Please sign in to comment.
Better handle ios6 system auth in case user un-tosses app from accoun…
…t settings by calling "ACAccountStore renew" when using ios6 system auth and response contains an invalid session. Summary: Also added overload to FBSession closeAndClearToken: to take an NSError*. Also tweaked FBSession close to no-op if already closed. Also tweaked Scrumptious example to report login errors from FBUserSettingsView. This does NOT address the "code 2" errors from when ios6 users toggle the slider in their device Facebook settings though those cases do transition to "ClosedLoginFailed" so it can be argued clients can code against it. This also does NOT seamlessly fix cases where the ios6 auth user has removed the post permission from their account settings; though it does allow them to logout and log back in to resolve. Further, this scenario does surface the "(#200) Requires extended permission: publish_actions" in the startForPostWithGraphPath handler so clients can surface it. Test Plan: Tested many cases with scrumptious, but primary issue was: 1. using io6 system auth, login and post from scrumptious. 2. remove scrumptious from account settings. 3. re-open app (if already on announce page, will transition to login) 4. click login 5. with fix, user is prompted via ios6 dialog again. (without fix), login would flash to announce view then present login. Tested the above in both scenarios where step 1 ends in either announce page or if user explicitly logged out (i.e., to verify user does not need to click login twice). Updated in revision 2 so that user does click login twice, if they had explicitly logged out of the app (the first login will report the error, the second login will re-surface the ios dialog). Tested same scenario with wilde-login on device, and also on ios 4.3 simulator to verify no changes in those uses cases. Revert Plan: Reviewers: jacl, gregschechte Reviewed By: jacl CC: clang, ekoneil Differential Revision: https://phabricator.fb.com/D587553 Task ID: 1764202
- Loading branch information...
Showing with 70 additions and 17 deletions.
- +14 −0 samples/Scrumptious/scrumptious/SCViewController.m
- +4 −1 src/FBRequestConnection.m
- +2 −0 src/FBSession+Internal.h
- +50 −16 src/FBSession.m