Changeset 1680a86 in lab.git for twitter/nt_bot.pl
- Timestamp:
- Sep 11, 2010 12:49:29 PM (14 years ago)
- Branches:
- master, trunk
- Children:
- d006afb
- Parents:
- c78c702
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
twitter/nt_bot.pl
rc78c702 r1680a86 5 5 use Net::Twitter; 6 6 7 my $consumer_key = 'CONSUMER_KEY'; 8 my $consumer_key_secret = 'CONSUMER_KEY_SECRET'; 9 my $access_token = 'ACCESS_TOKEN'; 10 my $access_token_secret = 'ACCESS_TOKEN_SECRET'; 7 use YAML::Tiny; 8 my $config = (YAML::Tiny->read('config.yml'))->[0]; 9 10 my $consumer_key = $config->{'consumer_key'}; 11 my $consumer_key_secret = $config->{'consumer_key_secret'}; 12 my $access_token = $config->{'access_token'}; 13 my $access_token_secret = $config->{'access_token_secret'}; 11 14 12 15 my $nt = Net::Twitter->new( … … 18 21 $nt->access_token_secret($access_token_secret); 19 22 20 my $res = $nt->update({ status => " test tweet!" });23 my $res = $nt->update({ status => "Perl から Twiitter を更新するテストですよー" });
Note: See TracChangeset
for help on using the changeset viewer.