Skip to content

Instantly share code, notes, and snippets.

@asonas
Created December 13, 2011 04:59
Show Gist options
  • Save asonas/1470671 to your computer and use it in GitHub Desktop.
Save asonas/1470671 to your computer and use it in GitHub Desktop.
twitter oauth sample
#!/usr/bin/env perl
use strict;
use warnings;
use utf8;
use Net::Twitter;
my $consumer_key = '';
my $consumer_key_secret = '';
my $access_token = '';
my $access_token_secret = '';
my $nt = Net::Twitter->new(
traits => ['API::REST', 'OAuth'],
consumer_key => $consumer_key,
consumer_secret => $consumer_key_secret,
);
$nt->access_token($access_token);
$nt->access_token_secret($access_token_secret);
my $res = $nt->update({ status => "こんにちはこんにちは!" });
#$nt->update({ status => $status, in_reply_to_status_id => $id });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment