Created
October 20, 2016 11:41
-
-
Save eternaltung/8ca3e88f9d6a40da40595deead1e789b to your computer and use it in GitHub Desktop.
Bot Framework ConnectorClient ChannelData Sample
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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