Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: facebook/facebook-ios-sdk
base: master
head fork: Azra87/facebook-ios-sdk
compare: master
Checking mergeability… Don't worry, you can still create the pull request.
  • 1 commit
  • 1 file changed
  • 0 commit comments
  • 1 contributor
Commits on Oct 11, 2012
@dilraba dilraba Fix Hellofacebook sample to disable "status update" after a failed po…
…st 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:

Task ID: 1782510
9 samples/HelloFacebookSample/HelloFacebookSample/HFViewController.m
@@ -166,7 +166,9 @@ - (IBAction)postStatusUpdateClick:(UIButton *)sender {
completionHandler:^(FBRequestConnection *connection, id result, NSError *error) {
[self showAlert:message result:result error:error];
- self.buttonPostStatus.enabled = YES;
+ if ([FBSession.activeSession isOpen]) {
+ self.buttonPostStatus.enabled = YES;
+ }
self.buttonPostStatus.enabled = NO;
@@ -193,7 +195,10 @@ - (IBAction)postPhotoClick:(UIButton *)sender {
[FBRequestConnection startForUploadPhoto:img
completionHandler:^(FBRequestConnection *connection, id result, NSError *error) {
[self showAlert:@"Photo Post" result:result error:error];
- self.buttonPostPhoto.enabled = YES;
+ if ([FBSession.activeSession isOpen]) {
+ self.buttonPostPhoto.enabled = YES;
+ }
self.buttonPostPhoto.enabled = NO;

No commit comments for this range

Something went wrong with that request. Please try again.