Skip to content

Instantly share code, notes, and snippets.

@eternaltung
Created October 20, 2016 11:41
Show Gist options
  • Save eternaltung/8ca3e88f9d6a40da40595deead1e789b to your computer and use it in GitHub Desktop.
Save eternaltung/8ca3e88f9d6a40da40595deead1e789b to your computer and use it in GitHub Desktop.
Bot Framework ConnectorClient ChannelData Sample
var msg = new Activity()
{
Type = ActivityTypes.Message,
From = botAccount,
ChannelId = "facebook",
Recipient = userAccount,
Conversation = new ConversationAccount(id: conversationId.Id),
ChannelData = JObject.FromObject(new
{
attachment = new
{
type = "template",
payload = new
{
template_type = "button",
text = "text",
buttons = new List<object>()
{
new
{
type = "web_url",
url = "https://tw.buy.yahoo.com/",
title = "shopping"
}
}
}
}
})
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment