botframework-sdk icon indicating copy to clipboard operation
botframework-sdk copied to clipboard

Facebook Receipt not displayed

Open ankitbko opened this issue 10 years ago • 8 comments

I followed documentation and created a Receipt reply which works with Skype but not with Facebook. Facebook Messenger supports rich card including carousal and receipt. Is fb supported for these kinds of messages?

ankitbko avatar Jul 11 '16 10:07 ankitbko

Any update on this? I see carousal is now showing up but receipts are still not working.

ankitbko avatar Jul 19 '16 08:07 ankitbko

receipt works with my test bot. Can you try again and if it fails post your JSON?

tomlm avatar Jul 20 '16 01:07 tomlm

@tomlm Below is the json from emulator. It works perfectly with Skype but not in fb.

{
  "type": "message",
  "timestamp": "2016-07-20T10:16:18.4124943Z",
  "from": {
    "id": "56800324",
    "name": "Bot1"
  },
  "conversation": {
    "id": "8a684db8",
    "name": "Conv1"
  },
  "recipient": {
    "id": "2c1c7fa3",
    "name": "User1"
  },
  "text": "",
  "attachments": [
    {
      "contentType": "application/vnd.microsoft.card.receipt",
      "content": {
        "title": "Car reservation confirmed",
        "items": [
          {
            "title": "Peugeot 107 1.0",
            "subtitle": "Size Small",
            "text": "Seats 4 person",
            "image": {
              "url": "https://abg20160531123425.azurewebsites.net/assets/images/peugeot_107.jpg"
            },
            "price": "USD 60"
          }
        ],
        "facts": [
          {
            "key": "Pick Location",
            "value": "London City Airport London"
          },
          {
            "key": "Pickup Time",
            "value": "21 July at 1:00 AM"
          },
          {
            "key": "Drop Location",
            "value": "Waterloo Station, London"
          },
          {
            "key": "Drop Time",
            "value": "22 July at 12:00 AM"
          }
        ],
        "total": "65.25",
        "tax": "5.25"
      }
    }
  ],
  "replyToId": "76ad643504734837916ed50c84d6ed4d"
}

ankitbko avatar Jul 20 '16 10:07 ankitbko

@tomlm Did you get a change to look at this?

ankitbko avatar Jul 28 '16 03:07 ankitbko

@ankitbko, where you able to solve this or is this still an outstanding issue?

Andrea-Orimoto avatar Aug 24 '16 01:08 Andrea-Orimoto

@Andrea-Orimoto I am still facing the issue. The bot portal is showing the following error in fb channel only when receipt is sent.

8/24/2016, 9:19:02 AM   Facebook graph API call failed with: BadRequest {"error":{"message":"(#100) The parameter is required","type":"OAuthException","code":100,"fbtrace_id":"CmrIJqwQc2T"}}
8/24/2016, 9:19:00 AM   Facebook graph API call failed with: BadRequest {"error":{"message":"(#100) The parameter is required","type":"OAuthException","code":100,"fbtrace_id":"Af1rvqVCE6J"}}

I have created a clean project to reproduce the issue here. Am I doing something wrong while creating the receipt? It is working fine in skype.

ankitbko avatar Aug 24 '16 04:08 ankitbko

@ankitbko I have reproduced your JSON code inside our testbot and I am getting a success receipt response in Facebook:

image

The only thing that I changed is the "replyToId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" with the Microsoft App ID from the details of our testbot.

Make sure you are using the correct replyToId data.

reyesrico avatar Aug 31 '16 00:08 reyesrico

If you still have more comments, please reopen the issue. Thank you.

reyesrico avatar Sep 01 '16 21:09 reyesrico