0

cURL次のコマンドを使用して、作成済みのアルバムに多数の写真を投稿しようとしています。

 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

私が得ているエラーはです(#324) Requires upload file。バッチリクエストで写真をアルバムに投稿することさえ可能ですか?もしそうなら、それを行う正しい方法は何cURLですか? ありがとう!

編集:CBroeのおかげで正しいコマンドは次のとおりです。

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
4

0 に答える 0