Você não pode usar -F
e -d
juntos, pois eles usam tipos de conteúdo diferentes e você precisa de multipart/form-data
. Então tente com:
https://graph.facebook.com/<id>/photos -F "[email protected]" -F "message=Me" -v
De man curl
:
-F/--form
(HTTP) This lets curl emulate a filled-in form in which a user has pressed the submit button. This causes curl to POST data using the Content-Type multipart/form-data according to RFC2388. This enables uploading of binary files etc. To force the 'content' part to be a file, prefix the file name with an @ sign. To just get the content part from a file, prefix the file name with the symbol <. The difference between @ and < is then that @ makes a file get attached in the post as a file upload, while the < makes a text field and just get the contents for that text field from a file.