Changeset a8a0b0a for lib/BarnOwl/Module/Twitter/Handle.pm
- Timestamp:
- Jul 22, 2009, 8:40:13 PM (15 years ago)
- Branches:
- master, release-1.10, release-1.7, release-1.8, release-1.9
- Children:
- 0b13bbc
- Parents:
- efcd223
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lib/BarnOwl/Module/Twitter/Handle.pm
refcd223 ra8a0b0a 61 61 $self->{twitter} = Net::Twitter->new(%twitter_args); 62 62 63 if(!defined($self->{twitter}->verify_credentials())) { 63 my $timeline = $self->{twitter}->friends_timeline({count => 1}); 64 65 if(!defined($timeline)) { 64 66 $self->fail("Invalid credentials"); 65 67 } 66 68 67 unless(defined($self->{last_id})) { 68 eval { 69 $self->{last_id} = $self->{twitter}->friends_timeline({count => 1})->[0]{id}; 70 }; 71 $self->{last_id} = 1 unless defined($self->{last_id}); 72 } 73 74 unless(defined($self->{last_direct})) { 75 eval { 76 $self->{last_direct} = $self->{twitter}->direct_messages()->[0]{id}; 77 }; 78 $self->{last_direct} = 1 unless defined($self->{last_direct}); 79 } 69 eval { 70 $self->{last_id} = $timeline->[0]{id}; 71 }; 72 $self->{last_id} = 1 unless defined($self->{last_id}); 73 74 eval { 75 $self->{last_direct} = $self->{twitter}->direct_messages()->[0]{id}; 76 }; 77 $self->{last_direct} = 1 unless defined($self->{last_direct}); 80 78 81 79 eval {
Note: See TracChangeset
for help on using the changeset viewer.