Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question] Will Bot Framework support Facebook messaging_types? #4154

Closed
JamesLouie opened this issue Feb 5, 2018 · 10 comments
Closed

[Question] Will Bot Framework support Facebook messaging_types? #4154

JamesLouie opened this issue Feb 5, 2018 · 10 comments

Comments

@JamesLouie
Copy link

Bot Info

  • SDK Platform:.NET, but also Node.js
  • Active Channels: Facebook
  • Deployment Environment: Azure Bot Service

Issue Description

Our team was reviewing Facebook documentation and we found that Facebook has added a new required field called messaging_types to their messages. Our dev team wants to know what implications this has for the platform, if there is a difference between Bot Framework generic messages vs custom messages we generate into the channeldata of a message.

Facebook Doc: https://developers.facebook.com/docs/messenger-platform/send-messages#messaging_types

@iMicknl
Copy link
Member

iMicknl commented Feb 17, 2018

+1. Partially overlapping #2924, about adding support for Facebook Message Tags.
Also, this will be required in the near future.

Breaking Change Notice
Beginning May 7, 2018 the messaging_type property will be required and all messages sent without it will not be delivered.
(source: Messaging Platform Docs

@FranciscoPonceGomez
Copy link
Contributor

We already support It. It defaults to ‘Response’ and can be changed via ‘messageing_type’ in channeldata.
I will send you a link with the updated documentation soon.

@JamesLouie
Copy link
Author

Is this default property appended on route from Bot Connector to Facebook, or is there a minimum version of the BotBuilder SDK we have to upgrade/use?

@FranciscoPonceGomez
Copy link
Contributor

This is not related to BotBuilder but part of the default behaviour of Bot Connector with Facebook.

@iMicknl
Copy link
Member

iMicknl commented Feb 23, 2018

@FranciscoPonceGomez, I'm quite confused now. Is it possible to change the messaging type or will the Bot Connector always use the default Response type?

If it is possible, it would be great if the docs.microsoft.com could be updated. Since this is something that has been requested a few times before and offers more options for pro-active bots on Facebook. See also issue #2924

@stuprice
Copy link

stuprice commented Mar 3, 2018

@FranciscoPonceGomez I have successfully set the messaging_type using the channel data as suggested above however I also need to set the associated tag. At present I get this error from Facebook:

{
  "error": {
    "message": "(#100) Tag is required for MESSAGE_TAG messaging type.",
    "type": "OAuthException",
    "code": 100,
    "error_subcode": 2018199,
    "fbtrace_id": "GvmKwSrcqVb"
  }
}

To me this indicates I have successfully set the messaging_type but not the tag. I have tried adding the tag from other suggestions (#2924) in the activity.Properties as below but it didn't work so I've also tried it in the ChannelData which also doesn't work.

activity.Properties = new Newtonsoft.Json.Linq.JObject();
activity.Properties.Add("tag", "CONFIRMED_EVENT_REMINDER");

activity.ChannelData = JObject.FromObject(new
{
    notification_type = "REGULAR",
    messaging_type = "MESSAGE_TAG",
    tag = "CONFIRMED_EVENT_REMINDER"
});

My use case is to be able to send a message outside Facebook's 24 + 1 policy by using message tags as described on Facebook Dev Docs. Any help would be great as this seems so close to working but at the same time is really limiting my bot's capabilities.

I have cross posted this to StackOverflow here.

Thanks

@advl03
Copy link

advl03 commented Mar 27, 2018

Hi everybody
How can I verify that the message is arriving OK to Facebook Messenger Platform? I mean: how can I check thath the messaging_type parameter is set properly? I've been trying with the Graph API, but I cannot get the full body of the message and not even the list of cards I'm sending to the user, as this other guy says: https://stackoverflow.com/questions/48180713/facebook-structured-message-template-in-conversation-api

@advl03
Copy link

advl03 commented Apr 9, 2018

@FranciscoPonceGomez , is it posible to get the documentation you mentioned in your previous reply on Feb 20th?
"We already support It. It defaults to ‘Response’ and can be changed via ‘messageing_type’ in channeldata.
I will send you a link with the updated documentation soon."

@donromeo
Copy link

@FranciscoPonceGomez or any other with the information, can you please share the documentation?. May 7th is 20 days from now and we must have our bots modified, tested and implemented by then.

@JasonSowers
Copy link
Contributor

@iMicknl @stuprice @advl03 @donromeo Apologies this never got Addressed, please see my answer in #4854

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants