0

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 Answers1

0

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.

Reegz
  • 511
  • 1
  • 6
  • 13
  • thanks for answer. I tested different links, for example: https://www.google.com/ Also I deployed my bot to web page (with Kommunicate.io) and to Slack. URL works only in Slack. I don't know how to check if file extention allowed by Meta, but I enable all webhooks. – vangerianin Mar 25 '23 at 20:51