title: How to redirect to iphone app from facebook login
body: <p>In my iphone app redirect to facebook login like facebook app when clicking a button. After login again redirect to my app.</p>
  
  <p>i'm using this code</p>
  
  <pre><code>NSArray *permissions =
  [NSArray arrayWithObjects:@"user_photos", @"friends_photos",@"email", nil];
  
  [FBSession openActiveSessionWithReadPermissions:permissions
                                     allowLoginUI:YES
                                completionHandler:
   ^(FBSession *session,
     FBSessionState state, NSError *error) {
  
       if(!error)
       {
           NSLog(@" hi im sucessfully lloged in");
       }
   }];
  </code></pre>