Facebook OAuth 重定向问题

发布于 2024-10-08 04:46:35 字数 391 浏览 0 评论 0原文

来自 Facebook 开发者页面的一些参考

这是我的问题.. 所有重定向都是按照上面的说明完成的,fb 服务器以普通的未格式化字符串返回一个访问令牌。如果我正在开发桌面应用程序或 iPhone,那就没问题了,但它是一个以浏览器为中心的应用程序。为什么 https://graph.facebook.com/oauth/access_token 不重定向?

A bit of reference from facebook developer page

Here is my question.. All the redirections are done followed the instructions above to the letter the fb server returns a acsess token in a plain unformatted string. Which would be fine if i was doing a desktop app or iPhone but, it's a browser centric app. any ides why https://graph.facebook.com/oauth/access_token doesn't redirect?

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

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

发布评论

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

评论(3

苍风燃霜 2024-10-15 04:46:35

为什么, https://graph.facebook.com/oauth/access_token 确实在网络应用程序,
只需在redirect_uri中提及您的网址=

https://graph.facebook.com/oauth/authorize?
client_id=...&
redirect_uri=http://www.example.com/oauth_redirect

如果这不是您所要求的,请在您的问题中稍微具体一些

why, https://graph.facebook.com/oauth/access_token does give a redirect in a web application,
just mention your url in redirect_uri =

https://graph.facebook.com/oauth/authorize?
client_id=...&
redirect_uri=http://www.example.com/oauth_redirect

If this is not what you asked , please be little specific in your question

圈圈圆圆圈圈 2024-10-15 04:46:35

显然,这是设计使然,这对 Facebook 来说并不聪明,无论如何,如果其他人想知道,您可以使用 WebClient 来执行请求以获取 oauth 令牌,而不是再次重定向。

Apparently when this is by design, which is not clever on Facebook's part, anyways instead of redirecting again you could use WebClient to do the request your self to get the oauth token, if anyone else is wondering.

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