title: Facebook OAuthException error in app. *Easy fix*
body: <p>One of my facebook applications is now giving this error after user accepts permissions: </p>
  
  <blockquote>
    <p>Fatal error: Uncaught OAuthException: (#322) Invalid photo tag subject
    thrown in /home/me/public_html/mysite/facebook.php on line 522</p>
  </blockquote>
  
  <p>The app still works fine, but gives that error instead of redirecting to the proper page after user allows permissions.</p>
  
  <p>Thi is line 521 - 529 of facebook.php:</p>
  
  <pre><code>if (is_array($result) &amp;&amp; isset($result['error'])) {
    $e = new FacebookApiException($result);
    if ($e-&gt;getType() === 'OAuthException') {
      $this-&gt;setSession(null);
    }
    throw $e;
  }
  return $result;
  </code></pre>
  
  <p>Can someone help me fix this error?</p>