tompaana / twitter-bot-fw-integration Goto Github PK
View Code? Open in Web Editor NEWA class library with a sample demonstrating how to add Twitter as one of the Microsoft Bot Framework channels with the help of Direct Line API.
License: Other
A class library with a sample demonstrating how to add Twitter as one of the Microsoft Bot Framework channels with the help of Direct Line API.
License: Other
In the TwitterBotIntegrationManager.cs, ReplyInTwitter method, you send a response and remove the user _twitterUsersWaitingForReply.Remove(messageIdAndTimestamp);
I'm trying to send multiple messages in response to a user's tweet so this will send the first message, but not the 2nd and 3rd as the _twitterUsersWaitingForReply.Remove(messageIdAndTimestamp); has been called.
If I comment this out, my 3 replies get delivered, but I didnt go through all the code to see the significance of the _twitterUsersWaitingForReply List.
Cant we just send a message to a user? Why do we care that they are "awaiting a reply" ?
When trying to send proactive messages twitter doesn't show anything, the code I am using is the following:
var userAccount = new ChannelAccount() {Id = activityRecibida.FromId, Name = activityRecibida.FromName};
var botAccount = new ChannelAccount()
{
Id = activityRecibida.RecipientId,
Name = activityRecibida.RecipientName
};
string url = activityRecibida.ServiceUrl;
MicrosoftAppCredentials.TrustServiceUrl(url, DateTime.Now.AddYears(2));
var appId = System.Configuration.ConfigurationManager.AppSettings["MicrosoftAppId"];
var appPassword = System.Configuration.ConfigurationManager.AppSettings["MicrosoftAppPassword"];
var account = new MicrosoftAppCredentials(appId, appPassword);
var connector = new ConnectorClient(new Uri(url), account);
IMessageActivity activity = Activity.CreateMessageActivity();
activity.From = botAccount;
activity.Recipient = userAccount;
activity.Conversation = new ConversationAccount() {Id = activityRecibida.ConversationId};
activity.Text = $"[{from}]: " + message;
activity.Locale = activityRecibida.Local;
var response = await connector.Conversations.SendToConversationAsync((Activity) activity);
await activityLogger.LogAsync(activity);
It works on facebook, emulator and skype, but here it simply doesn't. Do you have any clue? Thanks
Hi,
Sometimes I receive the same response twice, attached to the response of the next iteration.
Other times, the bot simply halts... specially If I use formflows or send many postasync msgs and a context.wait later
--
I tried to run this project on a new PC and it throws a null exception on the line 26 in Program.cs, why could it be?
thanks!
i was configured all the details in correct format. but still now i dont got any response. please help me @tompaana or all users
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.