انقطاع جزئي للخدمةshare-external
Getting "Unsupported request - method type: post" while sending image as message in Instagram
1

I've tried to send attachments like photo, voice and video in Instagram but I succeeded in voice & video not in uploading photo.

Upload photo to Facebook server

I tried uploading photo to Facebook server and I succeeded in, here's the cURL:

curl --location 'https://graph.facebook.com/v20.0/37*********4808/message_attachments?access_token=EAAON9rR********************CyKHzV' \
--form 'filedata=@"./whatsapp-cloud-api.png"' \
--form 'message="{\"attachment\":{\"type\":\"image\",\"payload\":{}}}"'

As per request I get the following response:

{
    "attachment_id": "53*********4940"
}

Send photo as a message to Instagram by attachment id

But When I tried to send message to Instagram by the attachment_id I get, using the following cURL:

curl --location 'https://graph.facebook.com/v20.0/37*********04808/messages?access_token=EAAON9rRp97********************24CyKHzV' \
--header 'Content-Type: application/json' \
--data '{
    "recipient": {
        "id": "159**********901"
    },
    "message": {
        "attachment": {
            "type": "image",
            "payload": {
                "attachment_id": "53**********4940"
            }
        }
    }
}'

As per this request I get the following response:

{
    "error": {
        "message": "Unsupported request - method type: post",
        "type": "GraphMethodException",
        "code": 100,
        "fbtrace_id": "APMZQqMefSnkK2P30rBfUTC"
    }
}

Sending message not working, hence give me Unsupported request - method type: post. Please, help me here. Thanks in advance.

Hasibul
تم طرح السؤال منذ حوالي شهرين
Hasibul

My business is approved even permissions are also reviewed and approved by meta, but still not working?

‏١٩ سبتمبر‏‏٩:٣٢ م‏111