AWS Lex attachmentLinkUrl in Lambda function doesn't work on Facebook

127 Views Asked by At

I'm trying to include URL in response of Lex bot on Facebook with Lambda function:

"dialogAction": {
    "type": "Close",
    "fulfillmentState": "Fulfilled",
    "message": {
        "contentType": contentTypeValue,
        "content": message
    },
    "responseCard": {
        "contentType": "application/vnd.amazonaws.card.generic",
        "version": 1,
        "genericAttachments": [{
            "title": "title",
            "subTitle": "subtitle",
            'imageUrl': 'image url',
            'attachmentLinkUrl': 'URL (doesn't work on facebook)'
        }]
    }
}

Buttons in response cards and everything else - work fine.

messaging_postbacks - enabled.

What else could go wrong?

I tryed to do everything described in this answers:

Creating carousel card in AWS Lex

Hyperlink in response card button in Amazon Lex

Documentation: https://docs.aws.amazon.com/lex/latest/dg/lambda-input-response-format.html

1

There are 1 best solutions below

1
Reegz On

A few things that you should check:

  • Is your attachment served using https
  • Is the link publicly accessible
  • Is the file extension allowed by Meta

Easiest would be to call the Graph API directly using the link as you have it now to see whether the API accepts it or not.