Thanks for the Reply again, I am beginning to understand things now.
But I just have a few more questions and a little problem (below)
From what I understood so far I prepared this code:
But it did not work.
Problems:
PSS - I used Console Write Line above to keep it simple.
But I just have a few more questions and a little problem (below)
From what I understood so far I prepared this code:
IToken token = new Token("My Access token", "My Access token secret", "My Consumer key", "My Consumer secret"); // Set your credentials here.
List<IUser> myFriendsToUpdate = new List<IUser>
{
new User("someoneimportant"),
};
IUserStream us = new UserStream();
us.TweetCreatedByAnyone += (sender, args) =>
{
var senderScreenName = args.Value.Creator.ScreenName;
if (myFriendsToUpdate.Select(x => x.ScreenName).Contains(senderScreenName))
{
Console.WriteLine("someoneimportant just tweeted something!");
}
};
us.StartStream(token);
This is the code I tried.But it did not work.
Problems:
-
Problem 1 - A local variable named 'sender' cannot be declared in this scope because it would give a different meaning to 'sender', which is already used in a 'parent or current' scope to denote something else.
-
Problem 2 - The program would freeze once I run the command above.
- Question 1 - Is my way of writing the tokens and keys wrong? If so Did I mess up the order or what I had to write?
- Question 2 - Do I need to run the code once or do I need to keep refreshing it. I would imagine that I would have to run it once since it constantly fetches data from the stream.
-
Question 3 - Is it normal that my Program Freezes? Can I run the code above and still maintain functionality for the rest of the form? (I am using Windows Forms)
PSS - I used Console Write Line above to keep it simple.