2017-12-10 37 views
0

이 튜토리얼에 설명 된대로 Spring Social을 사용하여 트윗을 올리려고했습니다 : https://docs.spring.io/spring-social-twitter/docs/current/reference/htmlsingle/.spring social twitter MissingAuthorizationException

new TwitterTemplate(consumerKey, consumerSecret, accessToken, accessTokenSecret); 

액세스 토큰은 여기서 생성 할 수있다 : 그러나 나는

TwitterTemplate twitterTemplate = new TwitterTemplate("key", "secret"); 
TweetData tweetData =new TweetData("test screenshot").withMedia(new ByteArrayResource(object.getScreenshot().getBytes())); 
Tweet postResult = twitterTemplate.timelineOperations().updateStatus(tweetData); 

답변

0

특정 작업이 TwitterTemplate와 함께 전달하기 위해 별도의 액세스 토큰을 필요로 다음과 같이

org.springframework.social.MissingAuthorizationException: Authorization is required for the operation, but the API binding was created without authorization. 

내 코드가 보이는 무엇입니까 : apps.twitter.com/app/"appId"/keys