ツイートの返信を求めています。私はNet::Twitter::Liteを使っています:
my $nt = Net::Twitter::Lite->new(%consumer_tokens, %access_tokens, legacy_lists_api=>1);
my $mentions = $nt->mentions();
print Dumper $mentions;
しかし、その後、エラーが 1 つだけあります: OAuth で認証できませんでした。何か案は?
次のようなツイートを投稿
my $status = $nt->update({ status => 'some text' });
できますが、返信がありません。
アップデート
仕事:
#!/usr/bin/perl
use warnings;
use strict;
use Net::Twitter::Lite;
use Data::Dumper;
my %consumer_tokens = (
consumer_key => 'xxxxxxxxxxxxxxxxxxxxxxxx',
consumer_secret => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
);
my %access_tokens=(
access_token => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
access_token_secret => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
);
my $nt = Net::Twitter::Lite->new(%consumer_tokens, %access_tokens, legacy_lists_api=>1);
#217932132083970049
my $status = $nt->update({ status => 'Happy Perl People!' });
print Dumper $status;
動作しない:
#!/usr/bin/perl
use warnings;
use strict;
use Net::Twitter::Lite;
use Data::Dumper;
my %consumer_tokens = (
consumer_key => 'xxxxxxxxxxxxxxxxxxxxxxxx',
consumer_secret => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
);
my %access_tokens=(
access_token => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
access_token_secret => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
);
my $nt = Net::Twitter::Lite->new(%consumer_tokens, %access_tokens, legacy_lists_api=>1);
#217932132083970049
my $mentions = $nt->mentions();
print Dumper $mentions;