Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Branch: master
Commits on Feb 8, 2012
  1. @onebit

    Fixes breaking change introduced by (e79d072)

    onebit authored
    Summary:
    The problem is that e79d072 fixes odd behavior in Hackbook,
    which had support in the SDK code’s logout function. Prior to e79d072
    Hackbook was more convoluted, and the logout behavior broke
    encapsulation. The solution is to put back a deprecated logout method that
    matches the original signature, and keeps most of the original behavior
    (though it does not break encapsulation, which was badness.)
    
    Test Plan:
    Manually modify Hackbook, and whitebox test each of the following
    permutations:
    * login with no delegate (call the cached delegate)
    * login with a delegate matching the cached delegate (call the cached delegate)
    * login with a delegate different from the cached delegate (call both)
    
    Reviewers: yariv, caabernathy, mmarucheck, vijaye
    
    Reviewed By: yariv
    
    Differential Revision: https://phabricator.fb.com/D405235
    
    Task ID: 905137
Commits on Feb 7, 2012
  1. Invalidate session only if access token errors when extending token

    Christine Abernathy authored Christine Abernathy committed
    Summary:
    Currently when there is a Platform API call that has any error or if there is a
    connection error, e.g. timeout, the access token is invalidated. This was due
    to
    diff D378197 where any errors call invalidSession. To fix this narrow the
    invalidate call to the scenario where the access token has expired when an API
    call
    is made.
    
    For now, only REST API error codes allow us to easily identify an invalid token
    (error code 190). A separate diff will be implemented by the Platform team
    to provide an error code for Graph API auth token errors.
    
    Test Plan:
    Case #1
    1/ Login
    2/ Tap Graph API
    3/ Tap Get your friends
    4/ Go off LAN and WiFi
    5/ Tap Get your friends
    
    Case #2
    1/ Turn WiFi back on
    2/ Tap Get your friends
    3/ See friends list
    4/ Go back to get to Graph API page
    5/ Remove app from https://www.facebook.com/settings/?tab=applications
    6/ Tap Get your friends
    
    Case #3
    1/ Temporarily modified code to force a Graph API error
         //[[delegate facebook] requestWithGraphPath:@"me" andParams:params
    andDelegate:self];
         [[delegate facebook] requestWithGraphPath:@"000000" andParams:params
    andDelegate:self];
    2/ Tap Graph API
    3/ Tap Get your information
    
    Before this change, here were the results
    Case #1: Session expires message, which is incorrect behavior
    Case #2: Session expires message, which is correct behavior
    Case #3: Session expires message, which is incorrect behavior
    
    After this change, here are the results
    Case #1: Get the Hackbook "Oops something went wrong" message, which is desired
    behavior
    Case #2: Get the Hackbook "Oops something went wrong" message, which is not
    ideal, user should also be logged out
    Case #3: Get the Hackbook "Oops something went wrong" message, which is desired
    behavior
    
    Reviewers: yariv, jimbru, brent, toddkrabach, jonathan
    
    Reviewed By: yariv
    
    CC: lshepard, selekman, beau, bgolub, danmuriello, jacl
    
    Differential Revision: https://phabricator.fb.com/D402481
    
    Revert Plan: OK
    
    Task ID: 900407
Commits on Jan 18, 2012
  1. @yariv
Commits on Jan 3, 2012
  1. @aselekman

    Update and Optimize iOS SDK for XCode 4

    aselekman authored
    Summary:
    Made the following changes:
    - Removed obsolete compiler flags
    - Exposed Public Headers
    - Set the Installation Directory to $(BUILT_PRODUCTS_DIR)
    - Set public header path to “$(TARGET_NAME)”
    - Set “Skip Install” build setting to Yes
    - Updated project format to XCode 4
    
    Test Plan: Added project to XCode 4 workspace, tested FB Login + SSO
    
    Reviewers: yariv, jimbru, brent
    
    Reviewed By: yariv
    
    CC: lshepard, caabernathy, security-diffs@lists, selekman, yariv
    
    Differential Revision: https://phabricator.fb.com/D383376
Commits on Dec 22, 2011
  1. Added the extendAccessToken method to facebook-ios-sdk

    Kamil Kraszewski authored Kamil Kraszewski committed
    Summary:
    Whenever user makes an API call the SDK checks if the access token is about to
    expire.  If that's the case SDK will try to silently refresh the token.
    Developer can also force the refreshing process by calling [facebook
    extendAccessToken] method (this might be useful for apps that doesn't make
    frequent API calls). Also provided an example of this functionality in the
    Hackbook.
    
    Test Plan:
    With prod: tried refreshing the token and check if the expirationDate is
    correct.
    
    With sandbox:
     - disabling checking the ssl certificates in the sdk (done by following lines
    (src/FBRequest.m) - I'm sure there's an easier way, but I don't know it :P):
    
      LANG=C
      - (BOOL)connection:(NSURLConnection *)connection
    canAuthenticateAgainstProtectionSpace:(NSURLProtectionSpace *)protectionSpace {
        return [protectionSpace.authenticationMethod
    isEqualToString:NSURLAuthenticationMethodServerTrust];
      }
      - (void)connection:(NSURLConnection *)connection
    didReceiveAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge {
        if ([challenge.protectionSpace.authenticationMethod
    isEqualToString:NSURLAuthenticationMethodServerTrust])
          [challenge.sender useCredential:[NSURLCredential
    credentialForTrust:challenge.protectionSpace.serverTrust]
    forAuthenticationChallenge:challenge];
        [challenge.sender
    continueWithoutCredentialForAuthenticationChallenge:challenge];
      }
    
    - changing the rest server url (in my case:)
    
      LANG=C
      static NSString* kRestserverBaseURL =
    @"https://api.kamil.devrs332.facebook.com/method/";
    
    - after that I switched to app which access expires after 10 minutes and tested
    if the refreshing process behaves correctly (had to modify isSessionOld
    function)
    
    Reviewers: yariv, jimbru, brent, ekoneil
    
    Reviewed By: yariv
    
    CC: lshepard, ekoneil, jgabbard, brent, yariv, kamil, trvish
    
    Differential Revision: https://phabricator.fb.com/D371702
    
    Task ID: 823099
Commits on Dec 20, 2011
  1. Update README.mdown

    dpurdy authored
  2. Update README.mdown

    dpurdy authored
Commits on Dec 19, 2011
  1. Removed unnecessary inheritance

    Kamil Kraszewski authored Kamil Kraszewski committed
    Summary: Quick code cleaning - Facebook class doesn't need to inherit from
    FBRequestDelegate.
    
    Test Plan: Check if it compiles and login in / login out works.
    
    Reviewers: yariv
    
    Reviewed By: yariv
    
    CC: jgabbard, yariv
    
    Differential Revision: 380359
  2. Added session expired error handling.

    Kamil Kraszewski authored Kamil Kraszewski committed
    Summary: Whenever we call an API that returns a "session expired" error we
    should clear the session data (acessToken / expiring date) and notify user about
    it.
    
    Test Plan: Login to app, then log out using www, then try calling rest / graph
    method.
    
    Reviewers: yariv, jimbru, brent, toddkrabach, jonathan
    
    Reviewed By: yariv
    
    CC: lshepard, yariv, kamil, brent, jonathan, toddkrabach
    
    Differential Revision: 378197
Commits on Dec 15, 2011
  1. Handling parallel requests

    Kamil Kraszewski authored Kamil Kraszewski committed
    Summary: Current SDK doesn't support multiple requests at the same time. To
    change this I added a new container to the Facebook class that stores all the
    requests. Whenever the request finishes it's work (by loading the response or by
    returning an error) we remove it from the container. Since FBRequests are
    autorelased they will be deleted at the end of the event loop.
    
    Test Plan: Check if the app works + tried to call the GetMe API method twice.
    
    Reviewers: yariv, toddkrabach, jonathan
    
    Reviewed By: toddkrabach
    
    CC: yariv, toddkrabach, jonathan, jimbru, lshepard, jgabbard, kamil
    
    Differential Revision: 378930
Commits on Dec 14, 2011
  1. Merged sessionDelegates in the Hackbook sample.

    Kamil Kraszewski authored Kamil Kraszewski committed
    Summary: Current Hackbook example implements two FBSessionDelegates. Switching
    between them requires modifying the internals of Facebook class and is very
    confusing. The solution is to remove FBSessionDelegate implementation from
    APICallsViewController, and modify the code in a way that will work with only
    one sessionDelegate.
    
    Test Plan:
    Try the following (two times every plan :) ):
      - login, execute any method, logout
      - login, execute any method, uninstall app
      - login, cancel login, login, execute any method, logout
      - login, request additional perms, cancel, request additional perms, grant,
    logout
    
    Reviewers: yariv
    
    Reviewed By: yariv
    
    CC: jimbru, lshepard, kamil, yariv
    
    Differential Revision: 377641
Commits on Dec 8, 2011
  1. Code cleaning of Hackbook example

    Kamil Kraszewski authored Kamil Kraszewski committed
    Summary: Removed trailing spaces, unified function definitions etc.
    
    Test Plan: Check if this compiles
    
    Reviewers: yariv, brent
    
    Reviewed By: yariv
    
    CC: jimbru, yariv
    
    Differential Revision: 374136
Commits on Nov 23, 2011
  1. Fix semantic warnings in Hackbook iOS sample app

    Christine Abernathy authored
    Summary: Use UITableViewCellSelectionStyleNone instead of
    UITableViewCellEditingStyleNone for selectionStyle.
    
    Test Plan: On iOS simulator 5.0 test Hackbook iOS sample app, publish feed,
    graph api sections.
    
    Reviewers: brent
    
    Reviewed By: brent
    
    CC: lshepard, yariv, brent
    
    Differential Revision: 365804
    
    Revert Plan: OK
Commits on Nov 19, 2011
  1. Update sample app to show how to handle dialog request results

    Christine Abernathy authored Christine Abernathy committed
    Summary:
    Part of the discussion of the abandoned diff https://phabricator.fb.com/D342789
    was that we should update the Hackbook iOS sample app to show developers how to
    process data passed back from the dialog. Changes were made to use
    dialogCompleteWithUrl: instead of
     dialogDidComplete: method. Other tweaks made to display a success message back
    to the user when an app request was sent. Also NSLog the post_id and request_ids
    information so developer can check these out.
    
    Changes still need to be made to the iOS SDK docs
    (https://developers.facebook.com/docs/reference/iossdk/FBDialogDelegate/) to let
    developers know how to handle the dialog data in the callback.
    
    Test Plan:
    1/ On iOS simulator 4.3 ran through the Publish Feed and Send Request flows.
    Checked it works and shows the proper user messages and debug messages (that
    developers could use in the future).
    2/ Tested on iPhone 5.0 and tested feed and app request dialog flows.
    
    Reviewers: brent
    
    Reviewed By: brent
    
    CC: lshepard, yariv, brent, caabernathy
    
    Differential Revision: 360490
    
    Revert Plan: OK
    
    Task ID: 697899
Commits on Nov 3, 2011
  1. Properly initialize FBDialog and Hackbook sample app data

    Christine Abernathy authored
    Summary:
    Related to pull requests
    facebook#405
    facebook#407
    
    Test Plan:
    1/ Tested Hackbook iOS app with iPhone 4 device with iOS 5, ran through various
    screens and tested dialog.
    2/ Tested Hackbook iOS app with iPad 2 device with iOS 4.3, ran through various
    screens and tested dialog.
    
    Reviewers: yariv, brent
    
    Reviewed By: yariv
    
    CC: lshepard, yariv
    
    Differential Revision: 355088
    
    Revert Plan: OK
    
    Task ID: 786690
Commits on Nov 2, 2011
  1. @mattdipasquale

    Fix semantic warnings in iOS5 and Xcode 4.2

    mattdipasquale authored Christine Abernathy committed
    Summary: Pulled from facebook#401
    
    Test Plan:
    1/ Ran on iPhone 4 device with iOS 5, Hackbook iOS app, launched feed dialog,
    rotate all orientations and check works as expected. Also rotated device before
    launching dialog and rotating dialog to see it performed well.
    2/ Ran experiment (1) with iPhone 4.3 simulator.
    3/ Ran experiment (1) with iPad 4.3 simulator.
    4/ Ran experiment (1) with iPad 5.0 simulator.
    
    Reviewers: yariv, brent
    
    Reviewed By: yariv
    
    CC: lshepard, yariv
    
    Differential Revision: 354600
    
    Revert Plan: OK
    
    Task ID: 673148
Commits on Oct 13, 2011
  1. Removing old sample DemoApp.

    Christine Abernathy authored
  2. Handle no friend case for publishing to friend's wall. Small memory l…

    Christine Abernathy authored
    …eak fix, need to release before making savedAPIResult nil first.
  3. Update ignore file, delete files that should be ignored. Fix warning …

    Christine Abernathy authored
    …in UITableViewCell selectionStyle assignment
Commits on Oct 10, 2011
  1. README tweaks

    Christine Abernathy authored
  2. @yariv

    Move the URL scheme suffix parameter from authorize: to init:

    yariv authored
    Summary: Moving the url scheme suffix parameter from authorize: to init:, where
    it fits better, as it behaves in a similar way to appId.
    
    Test Plan: Modified the demo app to use the new method signatures. Verified SSO
    still worked with and without a url scheme suffix.
    
    Reviewers: lshepard, brent, caabernathy, teck
    
    Reviewed By: brent
    
    CC: brent
    
    Differential Revision: 335813
  3. Dialog UI improvements, updated README, new sample Hackbook app

    Christine Abernathy authored
Commits on Sep 28, 2011
  1. @yariv

    rename localAppId to urlSchemeSuffix

    yariv authored
    Summary: urlSchemeSuffix is more descriptive and easier to grok than
    localAppId.
    
    Warning: This changes breaks compatibility with the previous version of the SDK. Please update your code to use the latest method signature.
    
    Test Plan: compiled and ran the demo app with a urlSchemeSuffix configured
    
    Reviewers: brent, lshepard, teck
    
    Reviewed By: lshepard
    
    CC: brent, lshepard
    
    Differential Revision: 334704
    
    Task ID: 737701
Commits on Sep 23, 2011
  1. fix project file

    Michal Kijewsi authored
Commits on Sep 13, 2011
  1. @yariv

    This reverts commit 74ae952.

    yariv authored
    The original behavior is the correct behavior as it prevents random errors from popping up the inline login dialog.
Commits on Sep 10, 2011
  1. @lshepard

    Merge pull request #382 from FunkeeMonk/inline_fallback

    lshepard authored
    Fallback to inline authentication dialog if SSO login fails.
Commits on Sep 9, 2011
  1. @FunkeeMonk

    Unless the server indicates a "service_disabled_use_browser" error, f…

    FunkeeMonk authored
    …allback to the inline authentication dialog in -[Facebook handleOpenURL:]
Commits on Aug 29, 2011
  1. @lshepard

    Remove auth.expireSession call from SDK

    lshepard authored
    Summary: The expireSession call was put in as a precaution to make sure that
    apps sessions were really no longer good. However, this is unnecessary and it
    causes issues with apps that were expecting the session to remain usable even
    after the user logged out. So let's remove this call and leave it up to the app
    developer to expire the session if they want.
    
    Test Plan: Logged in and out of the demo app.
    
    Reviewed By: trvish
Commits on Aug 26, 2011
  1. README changes only - Documentation update to match init session dele…

    Christine Abernathy authored
    …gate changes. Add notice on issue reporting.
Commits on Aug 15, 2011
  1. @raghuc

    Refactor to init session delegate in Facebook.m constructor

    raghuc authored
    Summary: The change basically just sets the session delegate in the constructor so
    it's available when handleOpenUrl is called.
    
    Test Plan: Ran the DemoApp and ensured SSO still works.
    
    Reviewed By: toddkrabach
    
    Reviewers: seshadri, leon, atishm, toddkrabach, lshepard, caabernathy
    
    Differential Revision: 297414
    Task ID: 653835
Commits on May 27, 2011
  1. @seshness

    Use the Graph API for the photo uploading example.

    seshness authored
    Summary:
    Edited uploadPhoto to use requestWithGraphPath instead of the legacy REST api
    requestWithMethodName method. Also added the publish_stream permission, which
    is
    needed for uploading photos.
    
    Test Plan:
    Run the DemoApp and login. Click the upload button and verify that a photo was
    uploaded to the user's Facebook account (pending approval).
    
    Reviewed By: yariv
    Reviewers: yariv
    CC: yariv
    Differential Revision: 257551
Commits on May 17, 2011
  1. @yariv

    a couple of small cleanups

    yariv authored
  2. @yariv

    small comment fix

    yariv authored
  3. @yariv

    Add the 'localAppId' param to [Facebook authorize]

    yariv authored
    Summary:
    This is the SDK diff to support the local_client_id URL parameter that we added
    to the FB app. I named it 'localAppId' to be consistent with the 'appId'
    parameter to the same function.
    
    Test Plan:
    bound the demo app to 'fb1234foo' and passed 'foo' as the localAppId value.
    verified the SDK used the 'fbauth2' url scheme to open the fb app and that the
    fb app successfully redirected back to the demo app.
    
    Reviewed By: brent
    Reviewers: lshepard, atishm, brent, oyamauchi, jimbru
    CC: brent
    Differential Revision: 211201
Something went wrong with that request. Please try again.