0

I'm trying to post a number of photos to an already created album using cURL with the following command:

 curl -F 'access_token=<>' \
    -F 'batch=[ \
        {"method":"POST","relative_url":"/album_id/photos","url":"<photo_url>"}, \
        {"method":"POST","relative_url":"/album_id/photos","url":"<photo_url>"}]' \
        https://graph.facebook.com

The error I'm getting is (#324) Requires upload file. Is it even possible to post photos in a batch request to an album and if so what is the correct way to do it with cURL? Thanks!

Edit: the correct command thanks to CBroe is:

curl -F 'access_token=<>' \
     -F 'batch=[ \
         {"method":"POST","relative_url":"/album_id/photos","body":"url=<photo_url>"}, \
         {"method":"POST","relative_url":"/album_id/photos","body":"url=<photo_url>"}]' \
         https://graph.facebook.com
Daniel
  • 1,075
  • 2
  • 14
  • 26

0 Answers0