Botframework-sdk: [.Net SDK, FB Messenger] How to send proactive message on Messenger?

Created on 7 Jan 2018  路  8Comments  路  Source: microsoft/botframework-sdk

Bot Info

  • SDK Platform: .NET
  • SDK Version: 3.12.2.4
  • Active Channels: facebook,sms
  • Deployment Environment: Auzure Bot Service

Issue Description

Unable to send proactive messages on face book channel. I read in document as it requires pages_messaging_subscriptions approved. But to test at the time of development, can we do proactive messaging without approval. if so could you please share me steps to follow to send proactive message on facebook.

Thanks in advance..

Most helpful comment

I can ask, but no promises. 馃憤

All 8 comments

Have you seen this doc?

Thanks for the response @JasonSowers . Yes I have followed the same and proactive messages are working fine with other channels. But my requirement is specific to face book which is not working with the same code. Am I need to do any sort of settings change in facebook developer page to do this?. And do we need to get approval from face book to send proactive messages to users at development stage?

@harigovind511 I think you can't use proactive messages on Facebook outside 24-Hour Messaging Window https://developers.facebook.com/docs/messenger-platform/policy/policy-overview#standard_messaging until this Feature request isn't implemented https://github.com/Microsoft/BotBuilder/issues/2924
@JasonSowers Could you please ask developers to implement it?

I can ask, but no promises. 馃憤

@harigovind511 @JasonSowers I found how I can add a tag.

var activity = (Activity)message;
activity.Properties = new Newtonsoft.Json.Linq.JObject();
activity.Properties.Add("tag", "APPLICATION_UPDATE");

I checked it in Facebook and all works fine.

Hi @Ma3yTa, Thanks for sharing. Could you please elaborate, how can we use it to send Proactive messages on facebook. If possible could you please share C# code snippet for the same, which will be more helpful for us.

@Kothakapu have you find a solution ? I'm creating a messenger bot , and i need to create a module to send broadcast message to users in a specific time .

Messenger bot developer permissions are determined by Facebook.

Please post Bot Framework Facebook Messenger requests here: https://github.com/Microsoft/BotBuilder/issues/4360

Based on Facebook documentation, bots are allowed to send subscription messages to FB Messenger users: https://developers.facebook.com/docs/messenger-platform/send-messages/

Jason has provided a reference to the docs, and some basic proactive messaging samples can be found here: https://github.com/Microsoft/BotBuilder-Samples/tree/master/CSharp/core-proactiveMessages

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Arimov picture Arimov  路  3Comments

vaditya04 picture vaditya04  路  3Comments

maba4891 picture maba4891  路  3Comments

jschristophe picture jschristophe  路  3Comments

kenyeung128 picture kenyeung128  路  3Comments