title: read and publish permission in facebook sdk 3.0 iOS
body: <p>In the last SDK, read and publish permissions are separated. So, in my code, whenever the users logs in I am using this code:</p>
  
  <pre><code>[FBSession openActiveSessionWithReadPermissions:nil
                                         allowLoginUI:YES
                                    completionHandler:
       ^(FBSession *session,
         FBSessionState state, NSError *error) {
           [self sessionStateChanged:session state:state error:error];
       }];
  </code></pre>
  
  <p>I have seen in the facebook developer that when I want to publish, I should ask for publish permissions like this:</p>
  
  <pre><code>// can include any of the "publish" or "manage" permissions
  NSArray *permissions = 
      [NSArray arrayWithObjects:@"publish_actions", nil];
  
  [[FBSession activeSession] reauthorizeWithPublishPermissions:permissions
                             defaultAudience:FBSessionDefaultAudienceFriends
          completionHandler:^(FBSession *session, NSError *error) {
           /* handle success + failure in block */
           }];
  </code></pre>
  
  <p>Since this is my first app that I am using facebook integration, I want to ask a couple of things:</p>
  
  <p>1) Can these sessions be open at the same time? I will ask for the publish permissions only when the user wants to publish, but should I do something else with the other session? Like close it first, and reopen it later or I should not worry about?</p>
  
  <p>2) If I have a postToFriends button for example, my pseudocode for making it work would be like this, right?</p>
  
  <pre><code>- (IBAction)postToFriendaction:(id)sender {
      if (!FBSession.activeSession.isOpen) {
          /* code from the above for enabling publish permissions*/
  
      }
  </code></pre>
  
  <p>or I should change !FBSession.activeSession.isOpen to something else, because no the user is logged in with read permission only, he never enters the if clause. Can you help me?</p>