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.
Here is the response I'm receiving:
response={"error":{"message":"Invalid parameter","type":"OAuthException","code":100,"error_subcode":1366046,"is_transient":false,"error_user_title":"Can'tRead Files","error_user_msg":"Your photos couldn't be uploaded. Photosshould be less than 4 MB and saved as JPG, PNG, GIF or TIFFfiles.","fbtrace_id":"AaAcYvfdWM/"}}
ps: The file is less than 4 MB.
HTTP request URL
https://graph.facebook.com/me/photos…{my user token}HTTP request format
contentType: multipart/form-data; boundary=----------UE4AdvancedFB
------------UE4AdvancedFB
Content-Disposition: form-data; name="source"; filename="sf.jpg"
Content-Type: image/jpeg
{byte data}
------------UE4AdvancedFB--
A important thing to notice is that I don't actually have a file here, but only bytes (coming from a game texture).
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?)
Any thoughts about the error response?
Thanks!