Changeset 1680a86 in lab.git for twitter


Ignore:
Timestamp:
Sep 11, 2010 12:49:29 PM (14 years ago)
Author:
mitty <mitty@…>
Branches:
master, trunk
Children:
d006afb
Parents:
c78c702
Message:
  • delete old style client
  • read configuration from YAML format file

git-svn-id: https://lab.mitty.jp/svn/lab/trunk@46 7d2118f6-f56c-43e7-95a2-4bb3031d96e7

Location:
twitter
Files:
1 deleted
2 edited

Legend:

Unmodified
Added
Removed
  • twitter/get_oauth.pl

    rc78c702 r1680a86  
    55use Net::Twitter; 
    66 
    7 my $consumer_key = 'CONSUMER_KEY'; 
    8 my $consumer_key_secret = 'CONSUMER_KEY_SECRET'; 
     7use YAML::Tiny; 
     8my $config = (YAML::Tiny->read('config.yml'))->[0]; 
     9 
     10my $consumer_key = $config->{'consumer_key'}; 
     11my $consumer_key_secret = $config->{'consumer_key_secret'}; 
     12my $access_token = $config->{'access_token'}; 
     13my $access_token_secret = $config->{'access_token_secret'}; 
    914 
    1015my $nt = Net::Twitter->new( 
  • twitter/nt_bot.pl

    rc78c702 r1680a86  
    55use Net::Twitter; 
    66 
    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'; 
     7use YAML::Tiny; 
     8my $config = (YAML::Tiny->read('config.yml'))->[0]; 
     9 
     10my $consumer_key = $config->{'consumer_key'}; 
     11my $consumer_key_secret = $config->{'consumer_key_secret'}; 
     12my $access_token = $config->{'access_token'}; 
     13my $access_token_secret = $config->{'access_token_secret'}; 
    1114 
    1215my $nt = Net::Twitter->new( 
     
    1821$nt->access_token_secret($access_token_secret); 
    1922 
    20 my $res = $nt->update({ status => "test tweet!" }); 
     23my $res = $nt->update({ status => "Perl から Twiitter を更新するテストですよー" }); 
Note: See TracChangeset for help on using the changeset viewer.