title: Error response from the Facebook API using HTTP POST request with multipart form-data
body: <p>I'm using the Facebook Graph API inside an Unreal Engine 4 project. I'm trying to implement the photo upload. The method I'm using is the multipart form data.</p>
  <p>Here is the response I'm receiving:</p>
  <blockquote>
  <p>response={&quot;error&quot;:{&quot;message&quot;:&quot;Invalid parameter&quot;,&quot;type&quot;
  :&quot;OAuthException&quot;,&quot;code&quot;:100,&quot;error_subcode&quot;:1366046,&quot;is_transient&quot;:false,&quot;error_user_title&quot;:&quot;Can't
  Read Files&quot;,&quot;error_user_msg&quot;:&quot;Your photos couldn't be uploaded. Photos
  should be less than 4 MB and saved as JPG, PNG, GIF or TIFF
  files.&quot;,&quot;fbtrace_id&quot;:&quot;AaAcYvfdWM/&quot;}}</p>
  </blockquote>
  <p><em>ps: The file is less than 4 MB.</em></p>
  <p><strong>HTTP request URL</strong></p>
  <pre><code>https://graph.facebook.com/me/photos…{my user token}
  </code></pre>
  <p><strong>HTTP request format</strong></p>
  <blockquote>
  <p>contentType: multipart/form-data; boundary=----------UE4AdvancedFB</p>
  <p>------------UE4AdvancedFB</p>
  <p>Content-Disposition: form-data; name=&quot;source&quot;; filename=&quot;sf.jpg&quot;</p>
  <p>Content-Type: image/jpeg</p>
  <p>{byte data}</p>
  <p>------------UE4AdvancedFB--</p>
  </blockquote>
  <p>A important thing to notice is that I don't actually have a file here, but only bytes (coming from a game texture).</p>
  <p>What should I do if I only want to send bytes but don't actually have a file? (what should be the Content-Disposition filename? And the Content-Type?)</p>
  <p>Any thoughts about the error response?</p>
  <p>Thanks!</p>