source: lab.git/twitter/nt_bot.pl @ d200f4d

vendor
Last change on this file since d200f4d was d200f4d, checked in by mitty <mitty@…>, 14 years ago

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

  • Property mode set to 100755
File size: 534 bytes
Line 
1#!/usr/bin/env perl
2use strict;
3use warnings;
4use utf8;
5use Net::Twitter;
6
7my $consumer_key = 'CONSUMER_KEY';
8my $consumer_key_secret = 'CONSUMER_KEY_SECRET';
9my $access_token = 'ACCESS_TOKEN';
10my $access_token_secret = 'ACCESS_TOKEN_SECRET';
11
12my $nt = Net::Twitter->new(
13  traits          => ['API::REST', 'OAuth'],
14  consumer_key    => $consumer_key,
15  consumer_secret => $consumer_key_secret,
16);
17$nt->access_token($access_token);
18$nt->access_token_secret($access_token_secret);
19
20my $res = $nt->update({ status => "test tweet!" });
Note: See TracBrowser for help on using the repository browser.