Hi,
I'm trying to adapt my code to the twitter API changes. As I only use the search endpoint I want to use the client authorization. In TwitterTemplate doc I see that I should check out the new endpoint OAuth2Operations.authenticateClient().
Maybe I missed something but from a TwitterConnectionFactory object I cannot get an OAuth2Operations instance. It would be perfect if I could do something like this for connecting:
So, I think that in the latest version there is not a service provider class that extends AbstractOAuth2ServiceProvider for twitter no? So I would have to implement it no?
Thanks!
I'm trying to adapt my code to the twitter API changes. As I only use the search endpoint I want to use the client authorization. In TwitterTemplate doc I see that I should check out the new endpoint OAuth2Operations.authenticateClient().
Maybe I missed something but from a TwitterConnectionFactory object I cannot get an OAuth2Operations instance. It would be perfect if I could do something like this for connecting:
Code:
TwitterConnectionFactory connectionFactory = new TwitterConnectionFactory(consumerKey, consumerSecret);
OAuth2Operations oauthOperations = connectionFactory.getOAuth2Operations();
TwitterTemplate twitter = new TwitterTemplate(oauthOperations.authenticateClient().getAccessToken());
So, I think that in the latest version there is not a service provider class that extends AbstractOAuth2ServiceProvider for twitter no? So I would have to implement it no?
Thanks!