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

Facebook: send button result with imBack does not work

Open vorti2 opened this issue 10 years ago • 10 comments

The "Select" buttons in Facebook carousel example (https://github.com/Microsoft/BotBuilder/blob/master/Node/examples/demo-facebook/app.js, line 236ff) does not work as aspected.

If the use clicks on a "Select" button nothing happens except the Facebook "waiting dots". Input of "select:101" (for example) works correctly.

Environment:

  • NodeJS Version: 5.10.1
  • Bot Version: 3.4.4

vorti2 avatar Nov 07 '16 11:11 vorti2

Sorry for the delay. I can try to reproduce the issue.

Stevenic avatar Nov 21 '16 03:11 Stevenic

Hi all,

I try to used button to postBack data;

In Emulator and Skype work fine, but in Facebook when click the button appear the the message button and the "waiting dots (...)"

Here part of the message

"attachments": [{
	"contentType": "application/vnd.microsoft.card.hero",
	"content": {
		"images": [],
		"buttons": [{
			"type": "postBack",
			"title": "Option1",
			"value": "1"
		},
		{
			"type": "postBack",
			"title": "Option2",
			"value": "2"
		}]
	}
}],  

ftachon avatar Nov 25 '16 19:11 ftachon

@Stevenic or @maxpert have you had a chance to look at this?

chrimc62 avatar Nov 27 '16 23:11 chrimc62

Hi all,

I tray to send a native Facebook message, the buttons appear in Facebook chat, but the behavior is the same.

here part of the message

"channelData": { "attachment": { "type": "template", "payload": { "template_type": "button", "text": "Select a option\n", "buttons": [{ "type": "postback", "title": "option 1", "payload": "1" }, { "type": "postback", "title": "option 2", "payload": "2" }, { "type": "postback", "title": "option X", "payload": "X" }] } } },

ftachon avatar Dec 02 '16 17:12 ftachon

I set a break point on your controller endpoint and inspect the message. You should be receiving a message with the payload as the .text field

tomlm avatar Dec 02 '16 18:12 tomlm

Hi, I have the acces.log form my server today, and I have all request / response from my application and didn't get response form Facebook when I click on the button

ftachon avatar Dec 02 '16 18:12 ftachon

Hi all, I know why I didn't received the post back, but I need help to fix it. When I click on Facebook's button the browser console (inspect tool) reported a error

POST https://www.messenger.com/messages/commerce/postback/?cta_id=bW5jdGE6Y3RhMV9FbnRNZXNzZW5nZXJDb21tZXJjZUl0ZW1fNjM5NTQyNTgyODk1MDkwXzA%3D&dpr=1 500()

ftachon avatar Dec 14 '16 17:12 ftachon

Not sure what's causing that. Did it include a message?

Stevenic avatar Dec 17 '16 19:12 Stevenic

Closing issue please reopen if you are still facing the issue.

maxpert avatar Jan 03 '17 22:01 maxpert

Solved the issue by enable option "messaging_postback" in the page Webhooks in Facebook Developer console.

vorti2 avatar Jan 04 '17 19:01 vorti2