public TwitterAuthService(BapesTwitterBotContext context, TwitterAppSettings appSettings) { _context = context; var appCredentials = new TwitterCredentials(appSettings.Key, appSettings.Secret); _authenticationContext = AuthFlow.InitAuthentication(appCredentials); }
public TwitterService(BapesTwitterBotContext context, TwitterUser user, TwitterAppSettings appSettings) { _context = context; _user = user; _appSettings = appSettings; Login(); }
private static void Auth() { var appSettings = new TwitterAppSettings("CONSUMER_KEY", "CONSUMER_SECRET"); var authService = new TwitterAuthService(new BapesTwitterBotContext(), appSettings); System.Console.WriteLine($"Auth URL: {authService.GetAuthUrl()}"); System.Console.WriteLine("Twitter Username:"******"PIN:"); var pin = System.Console.ReadLine(); authService.AddUser(username, pin); System.Console.WriteLine("Added"); }
public TwitterService(IOptions <TwitterAppSettings> twitterAppSettings) { _twitterAppSettings = twitterAppSettings.Value; }