title: Upload Image in facebook graph api by codeigniter
body: <p>I have made facebook app before also without codeigniter but this time facing little problem in integrating it with codeigniter.<br>
  But finally I did it. But I am unable to upload images to a particular album in user's profile. I am getting this error message --></p>
  
  <pre class="lang-none prettyprint-override"><code>Fatal error: Uncaught CurlException: 26: failed creating formpost data thrown in facebook.php on line 
  </code></pre>
  
  <p>Someone please help me in that.</p>
  
  <p>Here is the code---></p>
  
  <pre><code>$base_url = base_url();
              $image_name = $this-&gt;common_model-&gt;fetch_image_name_by_id($image_id);
  $fb_config = array(
              'appId'  =&gt; '148056051963323',
              'secret' =&gt; '0cebf087b3084e5a772b6c31acb2736a'  
          );
  
      $this-&gt;load-&gt;library('facebook', $fb_config);
  $this-&gt;facebook-&gt;setFileUploadSupport(true);
                  $album_details = array(
                      'message'=&gt; 'Win Free T-shirts',
                      'name'=&gt; 'LoL Sharing'
                  );
              $create_album = $this-&gt;facebook-&gt;api('/me/albums', 'post', $album_details);
  
  
              $photo_details = array(
                  'message'=&gt; 'photo description'
              );
              $photo_details['image'] = '@' . realpath(''.$base_url.'assets/joke_images/'.$image_name['image_name'].'');
              $upload_photo = $this-&gt;facebook-&gt;api('/'.$create_album['id'].'/photos', 'post', $photo_details);
  </code></pre>