Don't attempt native iOS login on pre-iOS 6 devices.

Calling [accountStore accountTypeWithAccountTypeIdentifier:@"com.apple.facebook"]
from the iPad 5.1 simulator causes the application to hang with this stack (tested
with JustRequestSample):

    frame #0: 0x91918c5e libsystem_kernel.dylib`semaphore_wait_trap + 10
    frame #1: 0x011b9022 libdispatch.dylib`_dispatch_semaphore_wait_slow + 108
    frame #2: 0x011b90fa libdispatch.dylib`dispatch_semaphore_wait + 36
    frame #3: 0x0011b35d Accounts`-[ACAccountStore accountTypeWithAccountTypeIdentifier:] + 199
    frame #4: 0x00014140 JustRequestSample`-[FBSession authorizeWithPermissions:defaultAudience:integratedAuth:FBAppAuth:safariAuth:fallback:isReauthorize:] + 529 at FBSession.m:893
    frame #5: 0x00013f27 JustRequestSample`-[FBSession authorizeWithPermissions:behavior:defaultAudience:isReauthorize:] + 118 at FBSession.m:839
    frame #6: 0x00012c22 JustRequestSample`-[FBSession openWithBehavior:completionHandler:] + 518 at FBSession.m:365
    frame #7: 0x000166e6 JustRequestSample`+[FBSession openActiveSessionWithPermissions:allowLoginUI:allowSystemAccount:isRead:defaultAudience:completionHandler:] + 270 at FBSession.m:1563
    frame #8: 0x000133a8 JustRequestSample`+[FBSession openActiveSessionWithReadPermissions:allowLoginUI:completionHandler:] + 82 at FBSession.m:533
    frame #9: 0x000028e1 JustRequestSample`-[JRViewController buttonRequestClickHandler:] + 289 at JRViewController.m:103

This makes it impossible to test apps in the 5.1 simulator.  Work around this by
clearing tryIntegratedAuth on pre-6.x devices, where it's never supported anyway.

This isn't an issue on real 5.1 devices, but being able to test in the simulator
for various versions is critical.
Merge branch 'fix-simulator-login-freeze' of git://github.com/zewt/facebook-ios-sdk
Facebook iOS SDK 3.2 (see https://developers.facebook.com/ios/change-log-3.x/)

Summary:

Modified
    FBSession properties accessToken, expirationDate and loginType have been deprecated. Instead use the new accessTokenData property to access this info.
    FBSession methods reauthorize* have been deprecated, instead use the requestNew* methods.
    Improved error handling logic, including handling various iOS 6 cases.
    The Scrumptious sample now uses FBLoginViewfor authentication. The sample has also been modified to show best practices in handling errors during authorization and calling Facebook APIs.
    Samples migrated from the deprecated APIs. The -ObjC linker flag added to all samples.
    Implicit logging added to provide Facebook Insights to events such as launching/dismissing the native share sheet, launching/dismissing the native Login dialog, friend picker usage, and place picker usage. A new advanced setting in the App Dashboard named Mobile SDK Insights, allows you to turn off the implicit logging which is on by default.
    PlacePickerSample sample displays an alert when a place is selected.
    JustRequestSample sample renamed to GraphApiSample.

Added
    FBWebDialog class to provide webview dialogs to replace Facebook dialog API.
    NSError(FBError) category extension to NSError to simplify Facebook error handling.
    FBSession methods requestNewPublishPermissions:defaultAudience:completionHandler: requestNewReadPermissions:completionHandler: for requesting new or additional permissions for the session.
    FBSession method openFromAccessTokenData to support opening from an FBAccessTokenData instance.
    FBSession class method renewSystemCredentials to allow easy refresh of iOS 6 account store.
    FBSession class methods to get and set default URL scheme suffix used in sessions:
        setDefaultUrlSchemeSuffix:
        defaultUrlSchemeSuffix
    FBAccessTokenData class to simplify access token data operations.
    FBSession property accessTokenData used to get the FBAccessTokenData used in the session.
    FBSessionTokenCachingStrategy methods to operate with FBAccessTokenData:
        nullCacheInstance - class method that returns an FBSessionTokenCachingStrategy instance that does not perform any caching. One scenario where this is useful is importing an access token using the openFromAccessTokenData method on an FBSession instance that is not initialized from cache. The nullCacheInstance can be used to create the required FBSession instance.
        cacheFBAccessTokenData: - method used to cache a token represented by FBAccessTokenData.
        fetchFBAccessTokenData - method used to fetch a cached token.
    FBPlacePickerViewController method updateView to allow a place picker refresh without a network roundtrip.
    FBLoginViewDelegate method loginView:handleError: to notify the delegate of communication or authorization errors.
    FBSettings method publishInstall:withHandler: enables defining a handler to process server response when publishing an attributed install for Mobile App Install Ads analytics.
    FBInsights class to provide client-side logging of specialized app analytics that are then available on Facebook Insights. Also provides analytics for Conversion Pixel tracking for ads optimization.
    FBSettings class methods setClientToken and clientToken to enable anonymous Facebook API calls in support of FBInsights logging.

Fixed
    Memory leaks in FBUserSettingsViewController, FBLoginView, and FBSession.
    Incorrect use of publish permissions when read permissions should be used, in FBUserSettingsViewController and FBLoginView.
    FBViewController to initialize ''done'' and''cancel'' buttons properly for non-programmatic init paths.
    FBViewController and FBLoginView documentation.
    A bug in the FBSession handleOpenURL method that no longer passed through errors.
    A bug in the FBSession handleDidBecomeActive method that incorrectly coupled to the active session.
    A bug in FBSession that prevented KVO of the state property.
    How friend picker and place picker selection changed events are triggered when items are deselected. The event was being triggered multiple times in certain scenarios.
    The friend picker to properly handle profiles with no name data.
    A bug in WebView Login dialog reauthorization flow that did not invoke reauthorization handlers.
    Rotation bugs in ProfilePictureSample, FriendPickerSample and FBUserSettingsViewController.
    FriendPickerViewController and PlacePickerViewController can now fetch Retina-sized images.

Reviewers: clang

Reviewed By: clang

Test Plan: Release Testing.
Facebook iOS SDK 3.2.1 (see https://developers.facebook.com/ios/change-log-3.x/)

Summary:

Added
    Support for frictionless application requests in FBWebDialogs

Fixed
    Exception in certain request methods when a handler is nil

Reviewers: gregschechte

Reviewed By: gregschechte

Test Plan: Release Testing.
Merge remote-tracking branch 'upstream/master'