title: Call open Url in appDelegate
body: <p>I have this code in my app delegate: </p>
  
  <pre><code>- (BOOL)application:(UIApplication *)application
       openURL:(NSURL *)url
   sourceApplication:(NSString *)sourceApplication
    annotation:(id)annotation {
  // attempt to extract a token from the url
  self.openedURL = url;
  // attempt to extract a token from the url
   return [FBSession.activeSession handleOpenURL:url];       
   }
  </code></pre>
  
  <p>how can I call it from a UIViewController??</p>
  
  <p>EDIT:</p>
  
  <pre><code>- (IBAction)authButtonAction:(id)sender {
  
  
  /*
   AppDelegate *appDelegate =
   [[UIApplication sharedApplication] delegate];*/
  
   // The user has initiated a login, so call the openSession method
   // and show the login UX if necessary.
   //[appDelegate openSessionWithAllowLoginUI:YES];
  
   // If the user is authenticated, log out when the button is clicked.
   // If the user is not authenticated, log in when the button is clicked.
   if (FBSession.activeSession.isOpen) {
   [FacebookDialogueViewControllerDelegate closeSession];
   } else {
   // The user has initiated a login, so call the openSession method
   // and show the login UX if necessary.
   [FacebookDialogueViewControllerDelegate openSessionWithAllowLoginUI:YES];
   }
  
  
  }
  </code></pre>
  
  <p>...the view controller then has this:</p>
  
  <pre><code>- (BOOL)openSessionWithAllowLoginUI:(BOOL)allowLoginUI {
  return [FBSession openActiveSessionWithReadPermissions:nil
                                            allowLoginUI:allowLoginUI
                                       completionHandler:^(FBSession *session,
                                                           FBSessionState state,
                                                           NSError *error) {
                                           [self sessionStateChanged:session
                                                               state:state
                                                               error:error];
                                       }];
   }
  </code></pre>