Domanda

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.

È stato utile?

Soluzione

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.

Altri suggerimenti

try put:

OAuthService service = new ServiceBuilder()
.provider(TwitterApi.SSL.class)
.apiKey("YOUR_API_KEY")
.apiSecret("YOUR_API_SECRET")
.callback("YOUR_CALLBACK")
.build();
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top