Permalink
Commits on Feb 25, 2013
  1. Facebook iOS SDK 3.2 (see https://developers.facebook.com/ios/change-…

    chrisp-fb committed Feb 25, 2013
    …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.
Commits on Oct 3, 2012
  1. Version bump

    onebit committed Oct 3, 2012
    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
  2. Tweak comment in the reauth-revoke->retry->disallow case in scrumptio…

    chrisp-fb committed Oct 3, 2012
    …us 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
Commits on Oct 2, 2012
  1. Add alert and comment to describe the case where users disallow re-au…

    chrisp-fb committed Oct 2, 2012
    …th 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
  2. Fix scrumptious state change handler so that failed logins take user …

    chrisp-fb committed Oct 2, 2012
    …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
  3. Improve FBRequestConnection error handling & iOS 6.0 permission bookk…

    onebit committed Oct 2, 2012
    …eeping
    
    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
  4. Revert change to FBSession close that would have no-op if state is al…

    chrisp-fb committed Oct 1, 2012
    …ready 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
  5. Add FBConditionalLog statement to better describe system authorizatio…

    chrisp-fb committed Oct 1, 2012
    …n (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
  6. Change comment describing FBNativeDialogResultError to more accuratel…

    chrisp-fb committed Oct 1, 2012
    …y 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
Commits on Oct 1, 2012
  1. Addresses memory leak and symbol clash from pull requests

    onebit committed Sep 29, 2012
    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
  2. Better handle ios6 system auth in case user un-tosses app from accoun…

    chrisp-fb committed with onebit Sep 28, 2012
    …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
Commits on Sep 27, 2012
  1. Fix app requests in Hackbook sample.

    chrisp-fb committed Sep 26, 2012
    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
  2. Fix typo so I can close another task.

    Eddie O'Neil committed Sep 26, 2012
    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
Commits on Sep 26, 2012
  1. Don't display a dialog if the user didn't pick a place from the place…

    chrisblizzard committed with onebit Sep 18, 2012
    … 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
Commits on Sep 25, 2012
  1. Simplifying the Hello Facebook sample

    onebit committed Sep 25, 2012
    Summary: per title
    
    Test Plan: ran app
    
    Reviewers: clang, chrisp, gregschechte
    
    Reviewed By: gregschechte
    
    CC: msdkexp@
    
    Differential Revision: https://phabricator.fb.com/D583796
  2. [ios-sdk] Remove photo upload from Scrumptious.

    clang13 committed Sep 25, 2012
    Summary: Removed photo upload capability from Scrumptious.
    
    Test Plan:
    - Ran Scrumptious
    
    Revert Plan:
    
    Reviewers: jacl, chrisp
    
    Reviewed By: chrisp
    
    CC: msdkexp@, caabernathy
    
    Differential Revision: https://phabricator.fb.com/D583695
  3. Cleanup and cosmetic improvements to projects

    onebit committed Sep 25, 2012
    Summary: Removing code that wasn't ready
    
    Test Plan: n/a
    
    Reviewers: gregschechte, clang
    
    Reviewed By: gregschechte
    
    CC: msdkexp@
    
    Differential Revision: https://phabricator.fb.com/D583756
    
    Task ID: 1731992
  4. Addresses flicker bug in scrumptious

    onebit committed Sep 25, 2012
    Summary:
    Moves the delayed call back one frame in the stack, in order to avoid
    its being active in the startup case
    
    Test Plan: Ran the app
    
    Reviewers: clang, chrisp
    
    Reviewed By: clang
    
    CC: msdkexp@
    
    Differential Revision: https://phabricator.fb.com/D583546
    
    Task ID: 1731992
  5. Adding support for sending Advertising identifier for conversion purp…

    vijaye committed Sep 25, 2012
    …oses
    
    Summary: On iOS6 and above, we can use Apple's blesssed Advertising Identifier for install conversion purposes.  Since we are not using this for tracking/targeted advertising purposes, we don't have to check the "limit targeting" setting.  (reference: https://developer.apple.com/library/ios/#documentation/AdSupport/Reference/ASIdentifierManager_Ref/ASIdentifierManager.html#//apple_ref/doc/uid/TP40012654)
    
    Test Plan: Ran Scrumptious on a clean simulator and verified that the ad-id is being captured and sent.
    
    Reviewers: jacl, mmarucheck, clang
    
    Reviewed By: jacl
    
    CC: jketchpaw, msdkexp@
    
    Differential Revision: https://phabricator.fb.com/D583190
  6. Add custom Insights logging for Share Sheet launch, cancel, and post

    gregschechter committed Sep 25, 2012
    Summary: Now that FBNativeDialogs is in, extend the Custom Insights logging introduced earlier tonight to Share Sheet operations.
    
    Test Plan: Tested by invoking the share sheet and watching things go.  Hit what I think Jason described as a bug with loginType that's causing the share sheet display to fail, but worked around it for the testing.
    
    Reviewers: jacl, clang
    
    Reviewed By: jacl
    
    CC: msdkexp@
    
    Differential Revision: https://phabricator.fb.com/D583401
  7. Add custom Insights logging for Share Sheet launch, cancel, and post

    gregschechter committed Sep 25, 2012
    Summary: Now that FBNativeDialogs is in, extend the Custom Insights logging introduced earlier tonight to Share Sheet operations.
    
    Test Plan: Tested by invoking the share sheet and watching things go.  Hit what I think Jason described as a bug with loginType that's causing the share sheet display to fail, but worked around it for the testing.
    
    Reviewers: jacl, clang
    
    Reviewed By: jacl
    
    CC: msdkexp@
    
    Differential Revision: https://phabricator.fb.com/D583401
  8. Update Hello Facebook to work with FBNativeDialogs

    onebit committed Sep 25, 2012
    Summary: Adds native sharing support for message and photo buttons
    
    Test Plan: Ran through combinations of logged in, logged out, etc.
    
    Reviewers: clang, gregschechte, mingfli, caabernathy
    
    Reviewed By: mingfli
    
    CC: msdkexp@
    
    Differential Revision: https://phabricator.fb.com/D583381
    
    Task ID: 1731992
  9. Support limited "custom logging" from the iOS SDK

    gregschechter committed Sep 25, 2012
    Summary: Add support for very specific event logging in the iOS SDK.  Single events, now from FriendPicker launch and PlacePicker launch, get sent to the server.  Underlying support for apps that are not FB auth'd as well.
    
    Test Plan: Tested via HelloFacebook
    
    Reviewers: jacl, clang
    
    Reviewed By: jacl
    
    CC: msdkexp@
    
    Differential Revision: https://phabricator.fb.com/D583180
  10. [ios-sdk] Implemented FBNativeDialogs support for iOS 6 share dialog.

    clang13 committed Sep 25, 2012
    Summary:
    Fleshed out the implementation, including error handling. Added Social.framework to sample
    applications.
    
    Test Plan:
    - Ran modified HelloFacebook sample that calls new API.
    
    Revert Plan:
    
    Reviewers: jacl
    
    Reviewed By: jacl
    
    CC: msdkexp@, caabernathy
    
    Differential Revision: https://phabricator.fb.com/D583323
  11. Establishes a loginType property on FBSession

    onebit committed Sep 25, 2012
    Summary:
    The meat of the change adding a property tracking login type
    the supported types are - none, system, app, web, inline web,
    and test account
    
    Test Plan: n/a
    
    Reviewers: clang
    
    Reviewed By: clang
    
    CC: msdkexp@, gregschechte
    
    Differential Revision: https://phabricator.fb.com/D583222
    
    Task ID: 1731992
  12. [ios-sdk] Added FBNativeDialogs class.

    clang13 committed Sep 24, 2012
    Summary:
    FBNativeDialogs class provides access to the iOS 6 native sharing dialog in a manner that provides consistency with
    any FBSession that the app may have opened (to ensure the OS notion of current user matches the app notion of
    same).
    
    Test Plan: Revert Plan:
    
    Reviewers: jacl
    
    Reviewed By: jacl
    
    CC: msdkexp@, gregschechte
    
    Differential Revision: https://phabricator.fb.com/D582883
Commits on Sep 24, 2012
  1. Fix Hackbook graph api usage

    gregschechter committed Sep 24, 2012
    Summary:
    Hackbook adopts the migration bundle of the SDK in general, meaning it gets updated profile picture viewer semantics, and thus receives an array rather than just a URL.
    
    Modify the accessor to dive in and get the URL when the 'details' isn't a string.
    
    Test Plan: Ran Hackbook
    
    Reviewers: jacl, chrisp, clang, mmarucheck, ayden, karthiks, mingfli, caabernathy
    
    Reviewed By: jacl
    
    CC: msdkexp@
    
    Differential Revision: https://phabricator.fb.com/D582510
  2. Improves timing of location request in scrumptious

    onebit committed Sep 24, 2012
    Summary: Waits until the user is logged on before asking for location access
    
    Test Plan: Ran the sample with both integrated and downlevel auth, confirmed request is in the right spot
    
    Reviewers: clang
    
    Reviewed By: clang
    
    CC: msdkexp@
    
    Differential Revision: https://phabricator.fb.com/D582465
    
    Task ID: 1731992
  3. [ios-sdk] Bump version numbers, fix headerdoc warning.

    clang13 committed Sep 24, 2012
    Summary:
    Version numbers need to reflect 3.1 rather than 3.0.
    
    Parameter rename in headerdoc.
    
    Test Plan:
    - Built distribution, saw 3.1
    
    Revert Plan:
    
    Reviewers: jacl
    
    Reviewed By: jacl
    
    CC: msdkexp@
    
    Differential Revision: https://phabricator.fb.com/D582421
  4. Add FBSession handleDidBecomeActive to better handle scenarios where …

    chrisp-fb committed Sep 22, 2012
    …users decline or do not complete app-switch authorizations.
    
    Summary:
    Add FBSession handleDidBecomeActive to better handle scenarios where users
    decline or do not complete app-switch authorizations. Consumers should call
    this method from their application delegate's 'applicationDidBecomeActive:'
    in a similar way as the 'handleOpenUrl:'.
    
    This method uses new internal state to clean up any incomplete (re)
    authorizations and takes into account the new iOS 6 system authorization.
    
    Test Plan:
    I. Ran unit tests in sdk core.
    II. Scrumptious testing
     (Test Matrix) For:
    1) ios6 device with system authorization
    2) ios6 device w/o system authorization but with facebook app login
    3) ios6 simulator using safari login fallback
    
     performed:
    a) login->accept auth; post->accept auth; verify post.
    b) login->decline/ignore; re-open app->login again; verify app state.
    c) after login; post->decline/ignore auth; verify app state;
       post again->accept auth; verify post.
    
    III. Verified SessionLoginSample
    
    Revert Plan:
    
    Reviewers: jacl, clang
    
    Reviewed By: jacl
    
    Differential Revision: https://phabricator.fb.com/D582040
    
    Task ID: 1752513
  5. [ios-sdk] When using iOS integrated auth, ensure basic info permissio…

    clang13 committed Sep 23, 2012
    …n is part of read permissions.
    
    Summary:
    iOS integrated auth requires at least one permission to be specified, so if read permissions
    are being requested, ensure basic info ("email") is among them.
    
    Test Plan:
    - Ran unit tests
    - Ran Scrumptious with iOS 6 integrated auth
    
    Revert Plan:
    
    Reviewers: jacl
    
    Reviewed By: jacl
    
    CC: msdkexp@
    
    Differential Revision: https://phabricator.fb.com/D582163
Commits on Sep 21, 2012
  1. [ios-sdk] Previous commit broke Scrumptious; Scrumptious needs to req…

    clang13 committed Sep 21, 2012
    …uest basic permissions.
    
    Summary:
    Because "email" is no longer added by default to all permission sets on iOS 6, Scrumptious needs to explicitly request
    it since it provides explicit a permission set.
    
    Fixed wording issue in header docs.
    
    Test Plan:
    - Ran Scrumptious on iOS 6
    
    Revert Plan:
    
    Reviewers: jacl
    
    Reviewed By: jacl
    
    CC: msdkexp@
    
    Differential Revision: https://phabricator.fb.com/D581447
  2. [ios-sdk] Fix small permission bug in FBSession; remove duplicate cop…

    clang13 committed Sep 21, 2012
    …ies of launch images in some samples.
    
    Summary:
    FBSession was adding "email" to iOS 6 permissions even when not necessary.
    
    Two copies of the launch images ended up being added to three of the samples. This confuses Xcode in some instances,
    plus is just plain redundant. Removing the duplicates.
    
    Test Plan:
    - Built and ran the three samples on an iOS device
    
    Revert Plan:
    
    Reviewers: jacl
    
    Reviewed By: jacl
    
    CC: msdkexp@
    
    Differential Revision: https://phabricator.fb.com/D581331
  3. [ios-sdk] Fix Scrumptious to handle session invalidation better; don'…

    clang13 committed Sep 20, 2012
    …t try to re-close FBSession if it is already closed.
    
    Summary:
    Depending on when Scrumptious encountered an invalid session state change, it was not always correctly
    presenting its login view.
    
    [FBSession closeAndClearTokenInformation] should not transition state if the session is already closed.
    
    Test Plan:
    - Ran Scrumptious on iOS6 simulator and device
    
    Revert Plan:
    
    Reviewers: jacl
    
    Reviewed By: jacl
    
    CC: msdkexp@
    
    Differential Revision: https://phabricator.fb.com/D580143
  4. Revert "acquire the iOS6 advertisingIdentifier, if not opted out, and…

    John Ketchpaw committed Sep 21, 2012
    … send it during publish."
    
    Summary:
    This reverts commit 4b156bc.
    
    Conflicts:
    	samples/Hackbook/Hackbook.xcodeproj/project.pbxproj
    	samples/ProfilePictureSample/ProfilePictureSample.xcodeproj/project.pbxproj
    	src/facebook-ios-sdk.xcodeproj/project.pbxproj
    
    Test Plan: verify that the build works and tests pass.
    
    Reviewers: jacl
    
    Reviewed By: jacl
    
    CC: msdkexp@
    
    Differential Revision: https://phabricator.fb.com/D581094