1

When trying to execute service.getRequestToken() from scribe library (Version 1.3.5) for using oauth with twitter api I always get "SSL is required" as response.

I have already checked all my configurations but there is https everywhere.

mschenk74
  • 3,561
  • 1
  • 21
  • 34

2 Answers2

4

In version 1.3.5 of scribe-java, the method getRequestTokenEndpoint() of TwitterApi uses the non-SSL version of the URL.

In version 1.3.6 this has been fixed. Unfortunetaly, this version has not yet made its way to the downloads section (http://mvnrepository.com/artifact/org.scribe/scribe). So one has to build the current version by himself unless it is available there.

mschenk74
  • 3,561
  • 1
  • 21
  • 34
  • 1
    Since the author of scribe has some objections against adding more and more Social Apis, perhaps https://github.com/hhru/subscribe (a fork of scribe) could be an alternative in several cases. – mschenk74 Nov 17 '14 at 07:36
1

try put:

OAuthService service = new ServiceBuilder()
.provider(TwitterApi.SSL.class)
.apiKey("YOUR_API_KEY")
.apiSecret("YOUR_API_SECRET")
.callback("YOUR_CALLBACK")
.build();
hugoharan
  • 11
  • 2
  • 1
    As I said - the problem has been fixed in 1.3.6 - it was just missing from the download area at the time I asked the question – mschenk74 Apr 11 '14 at 18:16