Created
January 15, 2014 07:10
-
-
Save ryochin/8432098 to your computer and use it in GitHub Desktop.
Net::Twitter::Lite: workaround for restricted SSL/TLS with API 1.1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use IO::Socket::SSL; | |
my $twitter = Net::Twitter::Lite::WithAPIv1_1->new( | |
consumer_key => $config->{consumer_key}, | |
consumer_secret => $config->{consumer_secret}, | |
access_token => $config->{access_token}, | |
access_token_secret => $config->{access_token_secret}, | |
apiurl => "https://api.twitter.com/1.1", | |
useragent_args => { | |
ssl_opts => { | |
verify_hostname => 0, | |
SSL_verify_mode => SSL_VERIFY_NONE, | |
}, | |
}, | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment