Guest User

Untitled

a guest
Mar 10th, 2018
278
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. # Simple commandline twitter script.
  2. # Reads a line from STDIN and updates twitter.
  3. # This doesn't work anymore, because of OAuth.
  4. # Net::Twitter does support OAuth so it could be rewitten to make it work
  5. # Created by Peter Stuifzand <peter.stuifzand@gmail.com>
  6.  
  7. use strict;
  8. use warnings;
  9.  
  10. use Net::Twitter;
  11. use Data::Dumper;
  12.  
  13. my $user = "USERNAME";
  14. my $password = "PASSWORD";
  15.  
  16. my $nt = Net::Twitter->new(
  17. traits => [qw/API::REST/],
  18. username => $user,
  19. password => $password,
  20. );
  21.  
  22. my $update = <>;
  23. chomp $update;
  24.  
  25. $nt->update({ status => $update });
Add Comment
Please, Sign In to add comment