Ignore:
Timestamp:
Sep 14, 2010, 11:24:34 PM (11 years ago)
Author:
Nelson Elhage <nelhage@mit.edu>
Branches:
master, release-1.7, release-1.8, release-1.9
Children:
8402a093
Parents:
ba042db
git-author:
Nelson Elhage <nelhage@mit.edu> (09/13/10 18:21:12)
git-committer:
Nelson Elhage <nelhage@mit.edu> (09/14/10 23:24:34)
Message:
Twitter: Don't attempt to do OAuth against non-twitter.com services.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • perl/modules/Twitter/lib/BarnOwl/Module/Twitter/Handle.pm

    r8c6e2c1 r10dd8e6  
    8585    my ($username, $password, $xauth);
    8686
    87     if (*Net::Twitter::Lite::xauth{CODE}) {
    88         $xauth = 1;
    89         $username = delete $twitter_args{username};
    90         $password = delete $twitter_args{password};
    91         $twitter_args{consumer_key}    = $cfg->{oauth_key};
    92         $twitter_args{consumer_secret} = $cfg->{oauth_secret};
    93     } else {
    94         BarnOwl::error("Please upgrade your version of Net::Twitter::Lite to support xAuth.");
     87    if ($cfg->{service} eq 'http://twitter.com') {
     88        BarnOwl::debug('Checking for xAuth support in Net::Twitter');
     89        if (*Net::Twitter::Lite::xauth{CODE}) {
     90            $xauth = 1;
     91            $username = delete $twitter_args{username};
     92            $password = delete $twitter_args{password};
     93            $twitter_args{consumer_key}    = $cfg->{oauth_key};
     94            $twitter_args{consumer_secret} = $cfg->{oauth_secret};
     95        } else {
     96            BarnOwl::error("Please upgrade your version of Net::Twitter::Lite to support xAuth.");
     97        }
    9598    }
    9699
Note: See TracChangeset for help on using the changeset viewer.