public static void Main(string[] args)
{
ConsoleOutput.PrintMessage("BoxKite.Twitter Live Fire Tests (Initiate User Auth)");
ConsoleOutput.PrintMessage("(control-c ends at anytime)");
var twitterConnection = new TwitterConnection("3izxqWiej34yTlofisw", "uncicYQtDx5SoWth1I9xcn5vrpczUct1Oz9ydwTY4");
var authString = twitterConnection.BeginUserAuthentication().Result;
// if the response is null, something is wrong with the initial request to OAuth
if (!string.IsNullOrWhiteSpace(authString))
{
ConsoleOutput.PrintMessage("Pin: ");
var pin = System.Console.ReadLine();
twitterCredentials = twitterConnection.CompleteUserAuthentication(pin, authString).Result;
}
if (twitterCredentials.Valid)
{
ConsoleOutput.PrintMessage(twitterCredentials.ScreenName + " is authorised to use BoxKite.Twitter.");
}
else
{
ConsoleOutput.PrintMessage("Something Went Wrong during User Authentication Dance.");
}
ConsoleOutput.PrintMessage("Press Return to close window");
System.Console.ReadLine();
}