title: iOS SDK OAuthException HTTP Error code 500
body: <p>since this week my iOS App has a problem accessing FB (via iOS FB SDK). Following error occurs: </p>
  
  <pre class="lang-js prettyprint-override"><code>2013-06-18 15:44:16.756 foo-coffee[2441:907] Error: HTTP status code: 500
  2013-06-18 15:44:16.761 foo-coffee[2441:907] Errrror: Error Domain=com.facebook.sdk Code=5 "The operation couldn’t be completed. (com.facebook.sdk error 5.)" UserInfo=0x21051e70 {com.facebook.sdk:ParsedJSONResponseKey={
  body =     {
      error =         {
          code = 1;
          message = "An unknown error has occurred.";
          type = OAuthException;
      };
  };
  code = 500;
  }, com.facebook.sdk:HTTPStatusCode=500}, (null)
  </code></pre>
  
  <p>The error occurs in the following function: </p>
  
  <pre class="lang-c prettyprint-override"><code>- (void)getFbFields:(CLLocationDegrees)lat longitude:(CLLocationDegrees)lng {
  NSString *fbquery =  [NSString stringWithFormat:@"search?type=place&amp;center=%f,%f&amp;distance=3000&amp;fields=name,cover", lat, lng];
  [FBRequestConnection
   startWithGraphPath:fbquery
   completionHandler:^(FBRequestConnection *connection,
                       id result,
                       NSError *error) {
       if (!error) {
           [self readFbResponse:result];
       } else {
           NSLog(@"Errrror: %@, %@", error, result); 
       }
   }];
  }
  </code></pre>
  
  <p>A possibility for the error could be the FB "July 10, 2013 Migration". Here I have in my developer-account the Message: A graph search endpoint without an access token. </p>
  
  <p>In the Roadmap for <a href="https://developers.facebook.com/roadmap/" rel="nofollow">July 10, 2013 Migration</a> is stated: </p>
  
  <blockquote>
    <p><strong>Graph API search changes</strong>
    User access tokens will be required for all search Graph API calls except Posts, Places and Pages. App access tokens may also be used for Post search Graph API calls. Places and Pages search Graph API calls will still require an App access token. Search for Applications will no longer be supported.</p>
  </blockquote>
  
  <p>So it seems that I need the "App access token". How do I integrate the "App access token" best? As parameter in the search URL or in another way? </p>