Skip to content

Instantly share code, notes, and snippets.

@syachi
Last active August 29, 2015 14:07
Show Gist options
  • Save syachi/d949b3a667a941ea5531 to your computer and use it in GitHub Desktop.
Save syachi/d949b3a667a941ea5531 to your computer and use it in GitHub Desktop.
#!/usr/bin/env perl
use utf8;
use strict;
use Net::Twitter::Lite::WithAPIv1_1;
my $consumer_key = 'dummy';
my $consumer_secret = 'dummy';
my $token = 'dummy';
my $token_secret = 'dummy';
my $nt = Net::Twitter::Lite::WithAPIv1_1->new(
consumer_key => $consumer_key,
consumer_secret => $consumer_secret,
access_token => $token,
access_token_secret => $token_secret,
ssl => 1,
);
my $post = 'もひとつてすと';
eval{$nt->update({status => $post});};
warn "Failed to tweet: $@\n" if ($@);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment