Skip to content

Instantly share code, notes, and snippets.

@matoken
Created July 10, 2015 11:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save matoken/40d5ee099496e9079ada to your computer and use it in GitHub Desktop.
Save matoken/40d5ee099496e9079ada to your computer and use it in GitHub Desktop.
#!/usr/bin/perl
use Encode;
use utf8;
use Net::Twitter;
my $twit = Net::Twitter->new(
traits => ['API::RESTv1_1'],
consumer_key => '',
consumer_secret => '',
access_token => '',
access_token_secret => '',
ssl => 1,
);
exit $twit->update( decode_utf8($_) ) for join(' ', @ARGV );
@matoken
Copy link
Author

matoken commented Jul 10, 2015

Twitter に引数を投稿するscript

% tw.pl はろー

Debian だと libnet-twitter-perl の導入だけで行ける

$ sudo apt install libnet-twitter-perl

http://dev.twitter.com/ でconsumer_key/consumer_secret/access_token/access_token_secret を入手して実行すれば動く
今でも動くけど2011年作で更新してないのでレガシーかも

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment