title: Uncaught GraphMethodException: Unsupported get request
body: <p>When I try to login with facebook from my website, this error occurs</p>
  
  <p>Fatal error: Uncaught GraphMethodException: Unsupported get request. Please read the Graph API documentation at <a href="https://developers.facebook.com/docs/graph-api" rel="nofollow">https://developers.facebook.com/docs/graph-api</a> thrown in /home2/******/public_html/includes/facebook/base_facebook.php on line 1271</p>
  
  <p>At the beginning, everything was alright. I haven't changed anything. What should I do to solve this?</p>
  
  <pre><code>/**
  Analyzes the supplied result to see if it was thrown
  because the access token is no longer valid.  If that is
  the case, then we destroy the session.
  
  @param $result array A record storing the error message returned
                      by a failed API call.
  **/
  protected function throwAPIException($result) {
  $e = new FacebookApiException($result);
  switch ($e-&gt;getType()) {
  // OAuth 2.0 Draft 00 style
    case 'OAuthException':
    // OAuth 2.0 Draft 10 style
    case 'invalid_token':
      // REST server errors are just Exceptions
    case 'Exception':
      $message = $e-&gt;getMessage();
      if ((strpos($message, 'Error validating access token') !== false) ||
          (strpos($message, 'Invalid OAuth access token') !== false) ||
          (strpos($message, 'An active access token must be used') !== false)
      ) {
        $this-&gt;destroySession();
      }
      break;
  }
  
  throw $e;
  }
  </code></pre>