简体   繁体   中英

https://api.twitter.com/oauth/request_token : Connection Timeout

org.springframework.web.client.ResourceAccessException: I/O error on POST request for " https://api.twitter.com/oauth/request_token ":Connection timed out; nested exception is java.net.SocketException: Connection timed out at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:607) at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:572) at org.springframework.web.client.RestTemplate.exchange(RestTemplate.java:493) at org.springframework.social.oauth1.OAuth1Template.exchangeForToken(OAuth1Template.java:192)

I have the exact same problem with a Python program.

POST https://www.twitter.com/oauth/request_token

Request headers are similar to this:

headers= {'Authorization': 'OAuth oauth_nonce="4df3da1d-18e1-4ea7-a9ac-03374483d6f2", oauth_timestamp="1486140325", oauth_version="1.0", oauth_signature_method="HMAC-SHA1", oauth_consumer_key="*****************", oauth_callback="http%3A%2F%example.com%3A8888%2Fauth%2Ftwitter", oauth_signature="***********************"'}

Result:

tornado.httpclient.HTTPError: HTTP 599: Timeout

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM