title: Cannot upload picture with graph API Facebook
body: <p>I've got a problem to upload a picture to a user album's.</p>
  
  <p>The application ask for 'req_perms' => 'publish_stream,user_photos'
  I'm doing this :</p>
  
  <pre><code>$fb = new Facebook(array(
         'appId'  =&gt; FB_APP_ID,
         'secret' =&gt; FB_SECRET_ID,
         'cookie' =&gt; true,
         'fileUpload' =&gt; true,
      ));
  $fb-&gt;setFileUploadSupport(true);
  
  $photo_details = array(
      'message'=&gt; 'Retrouve cette recette surhttp://apps.facebook.com/betaaa'
  );
  
  $file='/img/bar.png'; //Example image file
  $photo_details['image'] = '@'.realpath($file);
  echo '@'.realpath($file);
  
  //echo   '/me/'.$album_uid.'/photos';
  $upload_photo = $fb-&gt;api('/me/photos', 'post', $photo_details);
  </code></pre>
  
  <p>but I all the time get this message:</p>
  
  <blockquote>
    <p>Fatal error: Uncaught OAuthException: (#1) An unknown error occurred
    thrown</p>
  </blockquote>
  
  <p>I'm also publishing feeds with <code>$post = $fb-&gt;api('/me/feed', 'post', $recette_post_details);</code>
  and this is working...</p>
  
  <p>Somebody has an idea about this problem?</p>
  
  <p>Thanks.</p>