title: FBSession: an attempt was made reauthorize permissions on an unopened session
body: <p>I'm following this <a href="http://developers.facebook.com/docs/howtos/publish-to-feed-ios-sdk/">tutorial</a>
  to implement the view preview post on Facebook SDK 3.1, but when I call this method
  ...</p>
  
  <pre><code>// Ask for publish_actions permissions in context
      if ([FBSession.activeSession.permissions
           indexOfObject:@"publish_actions"] == NSNotFound) {
          // No permissions found in session, ask for it
          [FBSession.activeSession
           reauthorizeWithPublishPermissions:
           [NSArray arrayWithObject:@"publish_actions"]
           defaultAudience:FBSessionDefaultAudienceFriends
           completionHandler:^(FBSession *session, NSError *error) {
               if (!error) {
                   // If permissions granted, publish the story
                   [self publishStory];
               }
           }];
      } else {
          // If permissions present, publish the story
          [self publishStory];
      }
  </code></pre>
  
  <p>...</p>
  
  <p>returns the following error:</p>
  
  <blockquote>
    <p><em>*</em> Terminating app due to uncaught exception 'com.facebook.sdk: InvalidOperationException', reason: 'FBSession: an attempt was made
    ​​reauthorize permissions on an unopened session'</p>
  </blockquote>
  
  <p>What is happening can? Thank you!</p>
  
  <p><strong>EDIT:</strong>
  Ran my friend, thank you very much, but still have a detail ...When'll post the first time he asks to authorize the application I authorize this block of fall </p>
  
  <p>/*
   * open a new session with publish permission
   */</p>
  
  <pre><code>  [FBSession openActiveSessionWithPublishPermissions:[NSArray arrayWithObject:@"publish_actions"]
                                     defaultAudience:FBSessionDefaultAudienceOnlyMe
                                        allowLoginUI:YES
                                   completionHandler:^(FBSession *session, FBSessionState status, NSError *error) {
                                       if (!error &amp;&amp; status == FBSessionStateOpen) {
                                           [self publishStory];
                                       }else{
                                           NSLog(@"error");
                                          //Here I get the error mentioned below
                                       }
                                   }];
  }
  </code></pre>
  
  <p>with the error: error: </p>
  
  <blockquote>
    <p>domain = com.facebook.sdk, code = 5</p>
  </blockquote>