spring-socialのtwitterと連携しようと
/connect/twitter
にアクセスしたら
エラーが出てハマったのでメモ
ちなみにapplication.ymlのspring.social.twitterのapp-idとapp-secret指定しただけの状態。
エラー内容
org.springframework.web.client.ResourceAccessException: I/O error on POST request for “https://api.twitter.com/oauth/request_token”: cannot retry due to server authentication, in streaming mode; nested exception is java.net.HttpRetryException: cannot retry due to server authentication, in streaming mode
原因
Stackoverflowに書いてありました。
twitterのディベロッパーサイトでアプリを登録する際にcallbackUrlを指定しないと
このエラーが出るらしい。
アプリ設定画面で”http://localhost:8080″と指定すると
エラーが解消されました。