Skip to content

Instantly share code, notes, and snippets.

@hiragram
Last active December 14, 2015 21:38
Show Gist options
  • Select an option

  • Save hiragram/5152440 to your computer and use it in GitHub Desktop.

Select an option

Save hiragram/5152440 to your computer and use it in GitHub Desktop.
PerlでNet::Twitter::Liteを使ってツイットするやつ。よく忘れるのでメモ
#!/usr/bin/perl
use strict;
use warnings;
use Net::Twitter::Lite;
use Encode;
my $consumer_key = 'こんしゅーまーきー'
my $consumer_secret = 'こんしゅーまーしーくれっと';
my $access_token = 'あくせすとーくん';
my $access_token_secret = 'あくせすとーくんしーくれっと';
my $t = Net::Twitter::Lite->new(
consumer_key => $consumer_key,
consumer_secret => $consumer_secret,
access_token => $access_token,
access_token_secret => $access_token_secret,
legacy_lists_api => 0
#legacy_lists_apiを0にしないと実行する度にいらんお知らせがでる
);
$t->update({status=>decode('UTF-8',"hello")});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment