title: Send when creating event in PHP facebook
body: <p>I'm trying to POST a new event with fb Graph API (not the php-sdk)
  actually, everything works fine, except for the picture thing.
  Here is what i do:</p>
  
  <pre><code>&lt;?php
  public function publish($url){
          $params = $this-&gt;getParameter();
          $ch = curl_init($url);
          curl_setopt($ch, CURLOPT_POST, TRUE);        
          curl_setopt($ch,CURLOPT_POSTFIELDS,$params);        
          curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
          $returnValue = curl_exec($ch);
          curl_close($ch);
          return $returnValue;
      }
  
  public function getParameter() {
  
          $params["access_token"] = FbAuthentication::getInstance()-&gt;getToken();
          foreach ($this as $attr =&gt; $value) {
              if( $value != null)
                  $params[ $attr ] = $value;
          }
  
     //this things  is actually done inside an inheriting class (the $picture attr is protected)
          if( $this-&gt;picture != null){
              $real = realpath($this-&gt;picture);
              if(!file_exists($this-&gt;picture))
                  throw new Exception("File $this-&gt;picture not found");
              $params[basename($real)]="@$real";
  
          }
          return $params;
  
      }
  ?&gt;
  </code></pre>
  
  <p>The $params array is ok (i think). Here's a var_dump():</p>
  
  <pre><code>array(6) {
    ["access_token"]=>
    string(79) "......"
    ["name"]=>
    string(17) "Name example"
    ["description"]=>
    string(16) "Desc example"
    ["start_time"]=>
    string(19) "2011-03-22T18:00:00"
    ["end_time"]=>
    string(19) "2011-03-22T20:00:00"
    ["logo.gif"]=>
    string(26) "@/home/alessandro/logo.gif"
  }
  </code>
  </pre>
  
  <p>If i don't set the "$picture" parameter everything works well, but if I do put the image
  I recive this error:</p>
  
  <p><pre><code>
  {"error": 
             {"type":"OAuthException",
              "message":"(#324) Missing or invalid image file"}
  }</p>
  
  <p></pre></code></p>
  
  <p>Any idea of how to fix it?
  Thanks</p>
  
  <p>Edit: for some unknown reason this things works well with a pnj/jpeg file.
  It doesn't with a gif pic...</p>