Created
November 3, 2011 00:11
-
-
Save brenes/1335386 to your computer and use it in GitHub Desktop.
Change on the connect method on twitter-stream gem due to SSL requirements
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
| # Starting on 2011/09/29 Twitter Streaming API requires SSL to access. | |
| # Twitter stream gem is a gem built over EventMachine to get access to Twitter Streaming API | |
| # Unfortunately Twitter Stream uses http by default, not https. | |
| # We have to pass two extra options to the connect method | |
| stream = Twitter::JSONStream.connect( | |
| :path => "/1/statuses/filter.json?track=20N", | |
| :auth => "USER:PASS", | |
| # And the extra params!! | |
| :port => 443, | |
| :ssl => true | |
| ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment