Changeset 8c6e2c1 for perl/modules


Ignore:
Timestamp:
Sep 8, 2010, 9:32:01 PM (14 years ago)
Author:
Nelson Elhage <nelhage@mit.edu>
Branches:
master, release-1.10, release-1.7, release-1.8, release-1.9
Children:
ad7cc2f
Parents:
2c5ee3e
Message:
Twitter: Allow users to specify their own consumer key/secret.
Location:
perl/modules/Twitter
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • perl/modules/Twitter/README

    r5756999 r8c6e2c1  
    117117    username, regardless of whether or not this account is following
    118118    the sender. Has no effect if poll_for_tweets is false.
     119
     120* oauth_key, oauth_secret (strings, default barnowl's consumer credentials)
     121    These are the OAuth consumer key and secret to use to negotiate an
     122    OAuth connection to Twitter. These credentials must be enabled for
     123    "xAuth".
  • perl/modules/Twitter/lib/BarnOwl/Module/Twitter/Handle.pm

    r5d59c1e r8c6e2c1  
    6565        publish_tweets   => 0,
    6666        show_mentions    => 1,
    67         %$cfg
     67        oauth_key        => BARNOWL_CONSUMER_KEY,
     68        oauth_secret     => BARNOWL_CONSUMER_SECRET,
     69        %$cfg,
    6870       };
    6971
     
    8789        $username = delete $twitter_args{username};
    8890        $password = delete $twitter_args{password};
    89         $twitter_args{consumer_key}    = BARNOWL_CONSUMER_KEY;
    90         $twitter_args{consumer_secret} = BARNOWL_CONSUMER_SECRET;
     91        $twitter_args{consumer_key}    = $cfg->{oauth_key};
     92        $twitter_args{consumer_secret} = $cfg->{oauth_secret};
    9193    } else {
    9294        BarnOwl::error("Please upgrade your version of Net::Twitter::Lite to support xAuth.");
Note: See TracChangeset for help on using the changeset viewer.