[twitter-dev] Net::Twitter::Lite cannot authenticate me
Hello. I'm trying to tweet programmatically using the Net::Twitter::Lite perl module. I use their example verbatim, with my consumer_key and consumer_secret which I got by registering an app on twitter. When I run the script I get Could not authenticate you. I did copy and paste the two keys so there shouldn't be any typos. I did search the archives for this group and, while I see postings quite similar to mine, I couldn't find any resolutions or information that might help me. How can I debug this? Here's my script: #!/usr/bin/perl use warnings; use Net::Twitter::Lite; use Scalar::Util 'blessed'; # As of 13-Aug-2010, Twitter requires OAuth for authenticated requests my $nt = Net::Twitter::Lite-new( traits = [qw/OAuth API::REST/], consumer_key= 'my consumer_key', consumer_secret = 'my_consumer_secret', access_token= $token, access_token_secret = $token_secret, ); my $result = $nt-update('Hello, world!'); eval { my $statuses = $nt-friends_timeline({ since_id = $high_water, count = 100 }); for my $status ( @$statuses ) { print $status-{created_at} $status-{user}{screen_name} $status-{text}\n; } }; if ( my $err = $@ ) { die $@ unless blessed $err $err- isa('Net::Twitter::Lite::Error'); warn HTTP Response Code: , $err-code, \n, HTTP Message..: , $err-message, \n, Twitter error.: , $err-error, \n; } Thanks very much. Sol -- Twitter developer documentation and resources: http://dev.twitter.com/doc API updates via Twitter: http://twitter.com/twitterapi Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list Change your membership to this group: http://groups.google.com/group/twitter-development-talk
Re: [twitter-dev] Net::Twitter::Lite get_authorization_url missing oauth_token ?
* James McGill jbmcg...@gmail.com [101021 18:34]: I'm trying to use Net::Twitter::Lite OAuth. [...] unless ( $nt-authorized ) { # The client is not yet authorized: Do it now print Authorize this app at , $nt-get_authorization_url, and enter the PIN#\n; [...] which produces: Authorize this app at http://twitter.com/oauth/authorize?oauth_token= and enter the PIN# notice that the oauth_token in the url is empty!! I have Net::OAuth::Simple installed from CPAN. Has anybody experienced this before? I suspect that it's just some missing dependency but I'm not sure what. Any pointers would be greatly appreciated!! I'm the author of Net::Twitter::Lite. Net::Twitter::Lite does not use Net::OAuth::Simple. It uses Net::OAuth directly (which is a dependency of Net::OAuth::Simple---so if you have Simple installed, you should also have Net::OAuth). You should be able to run examples/oauth_desktop.pl (included in the Net::Twitter::OAuth distribution) directly. If that works, compare it to the code you're running. Feel free to drop by #net-twitter on irc.perl.org or email me directly for help. -Marc -- Twitter developer documentation and resources: http://dev.twitter.com/doc API updates via Twitter: http://twitter.com/twitterapi Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list Change your membership to this group: http://groups.google.com/group/twitter-development-talk
[twitter-dev] Net::Twitter::Lite get_authorization_url missing oauth_token ?
hi, I'm trying to use Net::Twitter::Lite OAuth. [...] unless ( $nt-authorized ) { # The client is not yet authorized: Do it now print Authorize this app at , $nt-get_authorization_url, and enter the PIN#\n; [...] which produces: Authorize this app at http://twitter.com/oauth/authorize?oauth_token= and enter the PIN# notice that the oauth_token in the url is empty!! I have Net::OAuth::Simple installed from CPAN. Has anybody experienced this before? I suspect that it's just some missing dependency but I'm not sure what. Any pointers would be greatly appreciated!! thanks!! cheers, james -- Twitter developer documentation and resources: http://dev.twitter.com/doc API updates via Twitter: http://twitter.com/twitterapi Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list Change your membership to this group: http://groups.google.com/group/twitter-development-talk
Re: [twitter-dev] NET::Twitter::Lite
* Darren darrenlb...@gmail.com [100922 08:53]: I'm using Perl with NET::Twitter::Lite to send messages to an account on Twitter which works fine from the command line but as soon as I put it inside a CRONTAB it won't work at all. I've got all the paths correct for a script within a crontab, it just seems to fail at the point it tries to send an update to Twitter... Any clues??? This typically occurs when you have the PERL5LIB environment variable set in .bashrc (or elsewhere) in your login enviroment, but not in cron. Check for PERL5LIB differences between the two environments. -Marc -- Twitter developer documentation and resources: http://dev.twitter.com/doc API updates via Twitter: http://twitter.com/twitterapi Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list Change your membership to this group: http://groups.google.com/group/twitter-development-talk
[twitter-dev] NET::Twitter::Lite
I'm using Perl with NET::Twitter::Lite to send messages to an account on Twitter which works fine from the command line but as soon as I put it inside a CRONTAB it won't work at all. I've got all the paths correct for a script within a crontab, it just seems to fail at the point it tries to send an update to Twitter... Any clues??? -- Twitter developer documentation and resources: http://dev.twitter.com/doc API updates via Twitter: http://twitter.com/twitterapi Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list Change your membership to this group: http://groups.google.com/group/twitter-development-talk?hl=en