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

Unable to generate receipt card for facebook messenger

Open manojkota opened this issue 10 years ago • 11 comments

Hi, I am unable to generate receipt card for facebook messenger.

Exception Message Facebook graph API call failed with: BadRequest {"error":{"message":"(#100) The parameter is required","type":"OAuthException","code":100,"fbtrace_id":"EMwZFz9wR2A"}}

manojkota avatar Jul 22 '16 00:07 manojkota

Are you using the ReceiptCard class? I managed to send the card but using Message.sourceEvent :/

matheus208 avatar Jul 22 '16 13:07 matheus208

Yes, I am using the Receipt class. Followed the documentation. I have tried with the same example they have mentioned on the page. I am able to send hero & thumbnail cards. The only problem is with Receipt card.

manojkota avatar Jul 25 '16 00:07 manojkota

Hello are you still having this issue?

danmarshall avatar Aug 12 '16 22:08 danmarshall

Yes.

manojkota avatar Aug 14 '16 23:08 manojkota

Same here, never got a ReceiptCard to work on Facebook, although it shows up fine in the bot emulator. Judging by #644 the ReceiptCard may be broken now.

anton-bot avatar Aug 26 '16 08:08 anton-bot

@msft-shahins @willportnoy FYI, the receipt card on Facebook is now throwing this error:

Facebook graph API call failed with: BadRequest {"error":{"message":"(#100) The parameter [summary][total_cost] is required","type":"OAuthException","code":100,"fbtrace_id":"D7N/8qwkicg"}}

but the code is setting the ReceiptCard.Total prop

ejadib avatar Aug 29 '16 14:08 ejadib

+1

AlexeyGrishinActimind avatar Sep 19 '16 11:09 AlexeyGrishinActimind

Same problem with builder.ReceiptCard() - It crashes

maheshcv avatar Oct 07 '16 06:10 maheshcv

Problem still persists.... works fine on Skype and emulator

leroibeukes avatar Oct 20 '16 05:10 leroibeukes

Can you post the raw message json that your bot is sending?

craigjensen avatar Oct 24 '16 17:10 craigjensen

Hi

I got it working by supplying the Tax and Total properties with a value of '1' - Apparently FB does not like 0's in those fields.... Overall the Receipt card in FB is just that - to be used as a receipt , in Skype you can wangle it for other purposes but in FB it has currency symbols and other info added.

leroibeukes avatar Oct 25 '16 03:10 leroibeukes