Advertisement
Guest User

Untitled

a guest
Sep 30th, 2012
238
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. AppDelegate *appDelegate=[[UIApplication sharedApplication] delegate];
  2.  
  3.  
  4.                        
  5.                             appDelegate.session = [[FBSession alloc] initWithPermissions:[NSArray arrayWithObjects:@"publish_stream", nil]];
  6.                            
  7.                        
  8.                         [appDelegate.session openWithCompletionHandler:^(FBSession *session, FBSessionState status, NSError *error) {
  9.                             switch (status) {
  10.                                 case FBSessionStateOpen:
  11.                                 [FBNativeDialogs presentShareDialogModallyFrom:currentController initialText:nil image:nil url:nil handler:^(FBNativeDialogResult result, NSError *error) {
  12.                             NSLog(@"New Native FB Dialog Error= %@",error);
  13.                         }];
  14.                                     break;
  15.                                    
  16.                                 default:
  17.                                     break;
  18.                             }
  19.                         }];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement