I am having problems running the following code. Authentication works fine but it fails on the search every time. Any help would be appreciated:
Console.WriteLine("Bot started: " + DateTime.Now);
service = new TwitterService(customerKey, customerKeySecret);
service.AuthenticateWith(accessToken, accessTokenSecret);
TwitterSearchResult tweets = service.Search(new SearchOptions { Q = "#FF", Count = 100 });
if (tweets != null)
{
foreach (var tweet in tweets.Statuses)
{
Console.WriteLine("{0} says '{1}", tweet.User.ScreenName, tweet.Text);
}
}
else
{
Console.WriteLine("FAIL");
}
Console.Read();
Console.WriteLine("Done");
The error looks like this:
Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'System.Security.Permissions, Version=0.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. The system cannot find the file specified.
I've tried adding the using directive System.Security.Permissions, although it isn't used. Still no luck.