Facebook OAuth 重定向问题
来自 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
为什么, https://graph.facebook.com/oauth/access_token 确实在网络应用程序,
只需在redirect_uri中提及您的网址=
如果这不是您所要求的,请在您的问题中稍微具体一些
why, https://graph.facebook.com/oauth/access_token does give a redirect in a web application,
just mention your url in redirect_uri =
If this is not what you asked , please be little specific in your question
是的,oauth 始终将重定向发送到您提到的网址 http:// /developers.facebook.com/docs/authentication/#authentication-users-in-a-web-application
yes oauth always send redirection to your mentioned url http://developers.facebook.com/docs/authentication/#authenticating-users-in-a-web-application
显然,这是设计使然,这对 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.