2

I have a problem with using messenger platform when i'm trying to send image. I've read this before start.

https://developers.facebook.com/docs/messenger-platform/send-api-reference/image-attachment

URL send works perfect but File upload gives me this error

{
    "error": {
        "message": "(#100) Incorrect number of files uploaded. Must upload exactly one file.",
        "type": "OAuthException",
        "code": 100,
        "error_subcode": 2018005,
        "fbtrace_id": "CDNEhlKlGrt"
    }
}

Here is my cURL

curl  \
  -F 'recipient={"id":"1102713306494360"}' \
  -F 'message={"attachment":{"type":"image", "payload":{}}}' \
  -F 'filedata=C:/users/terminal/test.png;type=image/png' \
  "https://graph.facebook.com/v2.6/me/messages?access_token=EAAC3tteq77IBAAnr5zseJ4vTYcMXPFVAHIl...

Here is an answer

enter image description here

What am i doing wrong?

4

1 回答 1

-1
-F 'filedata=@E:/desktop/Capture.PNG;type=image/png' \
于 2022-02-01T17:26:11.000 回答