使用 Oauth 消费者密钥、秘密、访问令牌和令牌秘密进行基于 Java 的 Rest 调用 [英] Make a java based Rest call with Oauth Consumer key,secret, access token and token secret

查看:85
本文介绍了使用 Oauth 消费者密钥、秘密、访问令牌和令牌秘密进行基于 Java 的 Rest 调用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

因此,我尝试使用 oauth 消费者密钥、机密、访问令牌和令牌机密在浏览器上使用 rest-client 进行 API 调用,并且运行正常,如下所示.

So I am trying to make an API call with rest-client on browser with oauth Consumer key,secret, access token and token secret and it woks fine as shown below.

请告知如何在 Java 中完成此操作?

Please advise how can this be done in Java ?

http://imgur.com/AtYVLH5

所有的 oauth 都显示了整个过程,但是一旦在第一次之后保存了密钥和令牌,如何进行 API 调用是个问题.

All the oauth show the whole process but once the key and tokens are saved after the first time, how to make the API call is the question.

提前致谢

推荐答案

您可以使用像 Google oAuth Java 客户端.示例位于此处.

You can use libraries like Google oAuth Java Client. Samples are here.

这篇关于使用 Oauth 消费者密钥、秘密、访问令牌和令牌秘密进行基于 Java 的 Rest 调用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆