title: Uncaught OAuthException: Error validating application
body: <p>I am developing my first facebook app, which includes creating a new album and posting photos to the user wall. By learning through facebook documentation and few tutorial and came up this code, but I am getting following error with it.</p>
  
  <p><code>Fatal error: Uncaught OAuthException: Error validating application. Thrown in /home/base_facebook.php on line 1106</code></p>
  
  <p>Plus: I don’t know if it matters or not, but when I am printing out the</p>
  
  <p><code>echo $facebook-&gt;getUser();</code></p>
  
  <p>variable it giving me ‘0’ in return even though user (which in this case is myself) is logged in.</p>
  
  <p>Kindly help me through this.</p>
  
  <p><em>Code:</em></p>
  
  <pre><code>$config = array(
  'appId'  =&gt; '3663250024856',
  'secret' =&gt; 'b14ac6d2b7dbdtyb259599b06983e881',
  'fileUpload' =&gt; true,
  'cookie' =&gt; true
  );
  
  
          $facebook = new Facebook($config);
          echo "USER STATUS:".$facebook-&gt;getUser();
          $facebook -&gt; setFileUploadSupport(true);
  
          $album_details = array('message' =&gt; 'Album desc', 'name' =&gt; 'Album name');
          $create_album = $facebook -&gt; api('/me/albums', 'post', $album_details);
  
          $album_uid = $create_album['id'];
  
          $photo_details = array('message' =&gt; 'Photo message');
          $file = "temp/".$imageName;
          $photo_details['image'] = '@' . realpath($file);
  
          $upload_photo = $facebook -&gt; api('/' . $album_uid . '/photos', 'post', $photo_details);
  </code></pre>