title: Storing facebook token for offline access
body: <p>I am looking for a way to save the access token to allow the user to post on facebook without having to log in for each call to the graph API :</p>
  
  <p>I require an offline_access token, i store it in the NSUserDefaults, but when i try to use it again i get a FacebookErrDomain error 10000</p>
  
  <p>Here is what i do :</p>
  
  <p>In the fbDidLogin i get the access_token and save it in the user defaults </p>
  
  <pre><code>- (void)fbDidLogin {
      NSString *token = self.facebook.accessToken;
      [[NSUserDefaults standardUserDefaults] setObject:token forKey:@"facebookToken"];
  
  }
  </code></pre>
  
  <p>After that when i run the app again i just get the token from the user defaults, and assign them to the facebook object :</p>
  
  <pre><code>NSString *token = [[NSUserDefaults standardUserDefaults] objectForKey:@"facebookToken"];
  [_facebook setAccessToken:token];
  </code></pre>
  
  <p>But it doesn't work..</p>
  
  <p>Has anybody any idea what i could be doing wrong ?</p>
  
  <p>Thanks,
  Vincent.</p>
  
  <p>EDIT :
  If i do a NSlog after <code>[[NSUserDefaults standardUserDefaults] objectForKey:@"facebookToken"];</code> i can see that the token was saved.</p>