如何将会话密钥升级为 OAuth 访问令牌 Facebook?

发布于 2024-09-15 22:54:32 字数 199 浏览 4 评论 0原文

我是 RestFB Java 库的新手。事实上,我不太明白如何获取 OAuth 访问令牌?之前我使用 Facebook Api Java 以及 API 密钥和 Secret 密钥进行身份验证。现在,我想使用 RestFB 来替换这个库。

你能帮我吗?您有关于这种新机制的 Java 示例吗?

非常感谢你,

问候,

安东尼

I novice with RestFB Java library. In fact, I don't understand very well how to get an OAuth access tokens ? Before I used Facebook Api Java with API key and Secret key for authentification. Now, I want to use RestFB to replace this library.

Can you help me please ? Have you got some Java example for this new mechanism ?

Thank you very much,

Regards,

Anthony

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

尹雨沫 2024-09-22 22:54:32

阅读此http://developers.facebook.com/docs/authentication/

了解如何用curl来做,那么使用任何你想要的java客户端在java中实现它应该很容易。对于您来说,花时间了解 oauth 及其工作原理,然后尝试实现它可能是个好主意。我知道它节省了我很多时间!

Read this http://developers.facebook.com/docs/authentication/

Understand how to do it with curl, then it should be very easy to implement in java using whatever java client you wish. Its probably a good idea for you to take the time to understand oauth and how it works, then try to implement it. I know it saved me a ton of time!

深府石板幽径 2024-09-22 22:54:32

这两个应用程序在过滤器/servlet 中都有 OAuth 代码片段,但我在使用这两个应用程序时都遇到了问题。他们可能会给您一些指示

http://code.google.com/p/facebook -java-webapp/

http://code.google.com/p/checkflames/

http://jazzy.id.au/default/ 2008/03/19/facebook_authentication_in_java.html

Both of these app have fragments of OAuth code in filters/servlets but i've had trouble with both. They might give you some pointers

http://code.google.com/p/facebook-java-webapp/

http://code.google.com/p/checkflames/

http://jazzy.id.au/default/2008/03/19/facebook_authentication_in_java.html

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文