This morning my Twitter Data Collection project suddenly stopped working. Suddenly, it failed to connect to the Twitter servers. It is as a result of the recent announcement made by twitter that it would allow only SSL connections starting from 29.09.2011.
I had been using twitter4j to connect to twitter stream. Even after setting the twitter4j.http.useSSL property to true, it failed to connect.The apparent solution to this was to update the twitter4j API to version 2.2.5-SNAPSHOT as announced through this tweet by twitter4j. But even after updating my project's pom.xml to the new version, the problem wasn't resolved. I figured out that the SNAPSHOT version wasn't getting downloaded for twitter4j-core. Here's how I fixed the problem:
<repository> <id>twitter4j.org</id> <name>twitter4j.org Repository</name> <url>http://twitter4j.org/maven2</url> <releases> <enabled>false</enabled> </releases> <snapshots> <enabled>true</enabled> </snapshots> </repository>
This fixed the problem. Finally my data collection is back on track! :)