Skip to content

Commit

Permalink
Fixes broken sample from previous commit
Browse files Browse the repository at this point in the history
Summary: Per title

Test Plan: Ran HelloFacebook sample

Reviewers: clang, chrisp

Reviewed By: chrisp

CC: msdkexp@

Differential Revision: https://phabricator.fb.com/D580427

Task ID: 1731992
  • Loading branch information
onebit committed Sep 20, 2012
1 parent 0bbc178 commit ed924de
Showing 1 changed file with 1 addition and 28 deletions.
Expand Up @@ -127,26 +127,14 @@ - (void) performPublishAction:(void (^)(void)) action {
// we defer request for permission to post to the moment of post, then we check for the permission
if ([FBSession.activeSession.permissions indexOfObject:@"publish_actions"] == NSNotFound) {
// if we don't already have the permission, then we request it now
<<<<<<< HEAD
[FBSession.activeSession reauthorizeWithPermissions:[NSArray arrayWithObject:@"publish_actions"]
behavior:FBSessionLoginBehaviorWithFallbackToWebView
[FBSession.activeSession reauthorizeWithPublishPermissions:[NSArray arrayWithObject:@"publish_actions"]
defaultAudience:FBSessionDefaultAudienceFriends
completionHandler:^(FBSession *session, NSError *error) {
if (!error) {
action();
}
//For this example, ignore errors (such as if user cancels).
}];
=======
[FBSession.activeSession reauthorizeWithPublishPermissions:[NSArray arrayWithObject:@"publish_actions"]
defaultAudience:FBSessionDefaultAudienceFriends
completionHandler:^(FBSession *session, NSError *error) {
if (!error) {
// re-call ourselves assuming we now have the necessary permission
[self postStatusUpdateClick:sender];
}
}];
>>>>>>> Bucketizes the permissions developer model by read and publish
} else {
action();
}
Expand Down Expand Up @@ -174,22 +162,7 @@ - (IBAction)postStatusUpdateClick:(UIButton *)sender {

// Post Photo button handler
- (IBAction)postPhotoClick:(UIButton *)sender {
<<<<<<< HEAD
[self performPublishAction:^{
=======
// we defer request for permission to post to the moment of post, then we check for the permission
if ([FBSession.activeSession.permissions indexOfObject:@"publish_actions"] == NSNotFound) {
// if we don't already have the permission, then we request it now
[FBSession.activeSession reauthorizeWithPublishPermissions:[NSArray arrayWithObject:@"publish_actions"]
defaultAudience:FBSessionDefaultAudienceFriends
completionHandler:^(FBSession *session, NSError *error) {
if (!error) {
// re-call ourselves assuming we now have the necessary permission
[self postPhotoClick:sender];
}
}];
} else {
>>>>>>> Bucketizes the permissions developer model by read and publish
// Just use the icon image from the application itself. A real app would have a more
// useful way to get an image.
UIImage *img = [UIImage imageNamed:@"Icon-72@2x.png"];
Expand Down

0 comments on commit ed924de

Please sign in to comment.