We have integrated the Twitter Fabric SDK into our Android app according to the instructions on the “Log in with Twitter” developer page; specifically, we’re using a TwitterLoginButton inside a Fragment. Sometimes the process works smoothly, and we get tweets from our requested timeline returned to our TweetViewAdapter.
Most of the time, however, we get various TwitterApiExceptions returned deep within the bowels of the SDK, specifically retrofit.RestAdapter$RestHandler.invokeRequest(), ranging from “Socket is closed”, “Handshake failed”, to “Shutdown”. Our fragment’s onActivityResult() is getting called in these cases as well, with the returned data dutifully passed on to the TwitterLoginButton. After that, we have fulfilled our contractual obligation to handle handshaking with the Twitter Fabric SDK and can only rely on it to process the contents of the Intent data.
If our application were not set up correctly we would never get a valid access token, but we’ve never failed to authorize, just download tweets. Our results are the same whether we login via a web browser or the native Twitter client. We’ve also used a range of Twitter Kit versions up through 1.6, all to no avail. The intermittent nature of the errors is troublesome. I have noticed a couple of related tickets posted on the forums, but neither of them have received a resolution.
Please let us know if there is anything not documented on the developer pages which would affect our implementation. Thanks for your time.