Don't display a dialog if the user didn't pick a place from the place picker.

Summary: Don't display a dialog if the user didn't pick a place.

Test Plan:
Click done in the place picker both with a place picked and without to see
if any problems crop up.

Click cancel in the place picker to make sure that it still dismisses the
dialog.

Reviewers: jacl

Reviewed By: jacl

CC: mmachedon

Differential Revision: https://phabricator.fb.com/D576940

Task ID: 1407166
Fix typo so I can close another task.

Summary: Fixing typo.

Test Plan: Check new spelling against the Oxford English Dictionary

Reviewers: jacl

Reviewed By: jacl

Differential Revision: https://phabricator.fb.com/D584998
Fix app requests in Hackbook sample.

Summary: Fix Hackbook sample's app requests to properly parse response on success. Also some minor clean up and simplification.

Test Plan:
Ran sample in simulator, verified app requests show success status.

Revert Plan:

Reviewers: jacl, caabernathy

Reviewed By: jacl

Differential Revision: https://phabricator.fb.com/D585439

Task ID: 1768482
Better handle ios6 system auth in case user un-tosses app from account 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
Addresses memory leak and symbol clash from pull requests

Summary: Thanks for the pull requests calebshay and lludo

Test Plan: built, unit-test run

Reviewers: clang, chrisp, mmarucheck

Reviewed By: chrisp

CC: gregschechte, ekoneil

Differential Revision: https://phabricator.fb.com/D587973

Task ID: 1731992
Change comment describing FBNativeDialogResultError to more accurately describe its usage.

Summary:
Change comment describing FBNativeDialogResultError to more accurately describe
its usage.

Test Plan:
n/a

Revert Plan:
n/a

Reviewers: jacl, clang

Reviewed By: jacl

Differential Revision: https://phabricator.fb.com/D588893
Add FBConditionalLog statement to better describe system authorization (ios6) failures that may be caused by misconfiguration.

Summary:
Add FBConditionalLog statement to better describe system authorization (ios6)
failures that may be caused by misconfiguration.

This handles the code = 7 case, where error looks like

{NSLocalizedDescription=The Facebook server could not fulfill this access
request: remote_app_id does not match stored id },  code:7

Test Plan:
Changed bundle identifier in scrumptious to something bogus. Tried to log on
and verified log message in console.
Verified no logging when bundle identifier is correct.

Revert Plan:

Reviewers: jacl

Reviewed By: jacl

Differential Revision: https://phabricator.fb.com/D589249
Revert change to FBSession close that would have no-op if state is already closed.

Summary: Revert change to FBSession close that would have no-op if state is already closed.

Test Plan:
Quickly tested scrumptious on 5.1 and 6.0 login/logout/post.

Revert Plan:

Reviewers: jacl

Reviewed By: jacl

Differential Revision: https://phabricator.fb.com/D588757

Task ID: 1764202
Improve FBRequestConnection error handling & iOS 6.0 permission bookkeeping

Summary:
Added a feature to FBRequestConnection to inform iOS 6.0 of permission related
failures. Added code to scrumptious to handle the case where a user explicitly
removes permissions.

Test Plan: Test the new flow via the new features in scrumptious

Reviewers: chrisp, clang

Reviewed By: chrisp

CC: gregschechte

Differential Revision: https://phabricator.fb.com/D589964

Task ID: 1778969
Fix scrumptious state change handler so that failed logins take user back to login screen as opposed to going to the announce view. Also improve the error alert views to translate the error code to a string.

Summary:
Fix scrumptious state change handler so that failed logins take user back to
login screen as opposed to going to the announce view. Also improve the error
alert views to translate the error code to a string.

Test Plan:
Ran scrumptious through various scenarios including successful logins,
 and cancelled logins (both via fast app switch or toggled ios6 app slider)

Revert Plan:

Reviewers: jacl

Reviewed By: jacl

Differential Revision: https://phabricator.fb.com/D589889

Task ID: 1778975
Add alert and comment to describe the case where users disallow re-auth retry in scrumptious.

Summary:
Add alert and comment to describe the case where users disallow re-auth retry
in scrumptious.

Test Plan:
1. login->allow->post->allow.
2. on server, remove post permission
3. in app, try to post again. App should ask for post permissions again
4. disallow, and see the new alert.
5. try to post again and see the new alert (without asking).
6. note slider is off in settings. turn slider back to on
7. try to post again and ios will ask for permissions again.

Revert Plan:

Reviewers: jacl

Reviewed By: jacl

Differential Revision: https://phabricator.fb.com/D590337
Tweak comment in the reauth-revoke->retry->disallow case in scrumptious to hint at developers to customize the message.

Summary:
Tweak comment in the reauth-revoke->retry->disallow case in scrumptious to hint
at developers to customize the message.

Test Plan:
re-ran scrumptious.

Revert Plan:

Reviewers: jacl

Reviewed By: jacl

Differential Revision: https://phabricator.fb.com/D590875
Version bump

Summary: Bumps the version and migration bundle

Test Plan: full test pass

Reviewers: clang, chrisp, mmarucheck

Reviewed By: chrisp

CC: gregschechte, ekoneil

Differential Revision: https://phabricator.fb.com/D590878
Fix Hellofacebook sample to disable "status update" after a failed post action

Summary: depending on the FB session the buttons are either enabled or disabled after a failed post

Test Plan:
1. installed the app
2. logged in using fb connect
3. gave the permissions
4. posted to the test account
5. on the web browser deleted the sample app from fb account settings
6. came back to the app and clicked on the post status
7. error was thrown
8. then the buttons are disabled (this was not the case before)

1. after the previous step logged back in again
2. tested that all the buttons were enabled
3. repeated the above steps for post photo and pick friend buttosn

Reviewers: chrisp, akash

Reviewed By: chrisp

CC: vmehta

Differential Revision: https://phabricator.fb.com/D596426

Task ID: 1782510