Hi!
Thanks for the reply. After I submitted the post, I did just what you suggested and it worked.
I don't know if you are familiar with the SignalR framework, but I want to have the stream in a SignalR Hub class and to pass the tweets to JavaScript and, say make an alert on the webpage. I am experiencing some difficulties, mainly because I am not so familiar with anonymous functions in C#.
Note that if I change the function so that it only passes a static message to the alert function, it will work.
Thanks!
Thanks for the reply. After I submitted the post, I did just what you suggested and it worked.
I don't know if you are familiar with the SignalR framework, but I want to have the stream in a SignalR Hub class and to pass the tweets to JavaScript and, say make an alert on the webpage. I am experiencing some difficulties, mainly because I am not so familiar with anonymous functions in C#.
public void TwitterStream()
{
TwitterCredentials.SetCredentials(...)
var stream = Stream.CreateSampleStream();
stream.TweetReceived += (sender, args) =>
{
Clients.All.alert(args.Tweet.Text);
};
stream.StartStream();
}
Now, the alert function that is called is implemented in the JavaScript code.Note that if I change the function so that it only passes a static message to the alert function, it will work.
Thanks!