* add new hash members to return value of or_search and mentions_ids
[lab.git] / get_oauth.pl
index 6f840ab..ca2199c 100755 (executable)
@@ -4,8 +4,13 @@ use warnings;
 use utf8;
 use Net::Twitter;
 
-my $consumer_key = 'CONSUMER_KEY';
-my $consumer_key_secret = 'CONSUMER_KEY_SECRET';
+use YAML::Tiny;
+my $config = (YAML::Tiny->read('config.yml'))->[0];
+
+my $consumer_key = $config->{'consumer_key'};
+my $consumer_key_secret = $config->{'consumer_secret'};
+my $access_token = $config->{'access_token'};
+my $access_token_secret = $config->{'access_token_secret'};
 
 my $nt = Net::Twitter->new(
   traits          => ['API::REST', 'OAuth'],