Dialog UI improvements, updated README, new sample Hackbook app
Move the URL scheme suffix parameter from authorize: to init:

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
Merge branch 'master' of https://github.com/facebook/facebook-ios-sdk
README tweaks
Update ignore file, delete files that should be ignored. Fix warning in UITableViewCell selectionStyle assignment
Handle no friend case for publishing to friend's wall. Small memory leak fix, need to release before making savedAPIResult nil first.
Removing old sample DemoApp.
Fix semantic warnings in iOS5 and Xcode 4.2

Summary: Pulled from https://github.com/facebook/facebook-ios-sdk/pull/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
Properly initialize FBDialog and Hackbook sample app data

Summary:
Related to pull requests
https://github.com/facebook/facebook-ios-sdk/pull/405
https://github.com/facebook/facebook-ios-sdk/pull/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
Update sample app to show how to handle dialog request results

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
Fix semantic warnings in Hackbook iOS sample app

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
Code cleaning of Hackbook example

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
Merged sessionDelegates in the Hackbook sample.

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
Handling parallel requests

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
Added session expired error handling.

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
Removed unnecessary inheritance

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
Update README.mdown
Update README.mdown
Added the extendAccessToken method to facebook-ios-sdk

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
Update and Optimize iOS SDK for XCode 4

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