Skip Menu |

This queue is for tickets about the Log-Dispatch-Twitter CPAN distribution.

Report information
The Basics
Id: 63400
Status: resolved
Priority: 0/
Queue: Log-Dispatch-Twitter

People
Owner: Nobody in particular
Requestors: RENEEB [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.02
Fixed in: (no value)



Subject: Use OAuth interface of Twitter
Twitter requires to use the OAuth interface... The attached patch removes the user and password params and introduces the customer_key, customer_secret and access_token params... - Renée
Subject: Twitter.diff
--- Twitter.pm 2010-11-27 23:56:59.201228482 -0800 +++ /usr/local/share/perl/5.10.0/Log/Dispatch/Twitter.pm 2010-11-28 00:06:16.822403127 -0800 @@ -24,6 +24,11 @@ $self->{username} = $args{username}; $self->{password} = $args{password}; + + $self->{access_token} = $args{access_token}; + $self->{access_token_secret} = $args{access_token_secret}; + $self->{consumer_key} = $args{consumer_key}; + $self->{consumer_secret} = $args{consumer_secret}; } sub log_message { @@ -44,9 +49,12 @@ my $message = shift; my $twitter = Net::Twitter->new( - username => $self->{username}, - password => $self->{password}, + consumer_key => $self->{consumer_key}, + consumer_secret => $self->{consumer_secret}, ); + + $twitter->access_token( $self->{access_token} ); + $twitter->access_token_secret( $self->{access_token_secret} ); $twitter->update($message); }
Hi Renée, I've solved this in a slightly different way instead of your patch, but OAuth should work better in 0.03 now! Thanks, Shawn