vb.net Facebook 将 URL 重定向到“https://www.facebook.com/dialog/oauth/read”,没有访问令牌
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/17231151/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Facebook Redirect url to "https://www.facebook.com/dialog/oauth/read" with no access token
提问by user1523291
I have set a web browser control in winform and navigate to the following url-
我在 winform 中设置了一个 Web 浏览器控件并导航到以下 url-
https://www.facebook.com/dialog/oauth?client_id=xxxxxxxxxxxxx&redirect_uri=https://www.facebook.com/connect/login_success.html&display=popup&scope=publish_stream,user_status&response_type=token
It show the login dialog box. After enter username and password facebook redirect to following url-
它显示登录对话框。输入用户名和密码后,facebook 重定向到以下 url-
https://www.facebook.com/login.php?skip_api_login=1&api_key=xxxxxxxx&signed_next=1&next=https://www.facebook.com/dialog/oauth?redirect_uri=https%253A%252F%252Fwww.facebook.com%252Fconnect%252Flogin_success.html&display=popup&scope=publish_stream%252Cuser_status&response_type=token&client_id=xxxxxxxxxx&ret=login&cancel_uri=https://www.facebook.com/connect/login_success.html?error=access_denied&error_code=200&error_description=Permissions+error&error_reason=user_denied%23_=_&display=popup
and display a message with two button called "okay" & "cancel"
并显示带有两个按钮的消息,称为“确定”和“取消”
xyourappxxxx would like to access your public profile, friend list and status updates.
if i click on "Okay" button this will redirect to following page with the msg of--
如果我点击“好的”按钮,这将重定向到以下页面,并带有--
page---https://www.facebook.com/dialog/oauth/read
message---Success SECURITY WARNING: Please treat the URL above as you would your password and do not share it with anyone.
application type: Native/desktop
App secret in client: no
Client OAuth Login: enbl
Embedded browser OAuth Login: enbl
Sandbox mod: ON
消息---成功安全警告:请像对待密码一样对待上面的 URL,不要与任何人共享。
应用程序类型:本机/桌面
客户端中的应用程序机密:否
客户端 OAuth 登录:enbl
嵌入式浏览器 OAuth 登录:enbl
沙盒模式:开启
Problem is after authorization facebook not redirect to my redirect_uri and not getting any access token.
问题是授权后 facebook 没有重定向到我的 redirect_uri 并且没有获得任何访问令牌。
I am using vb.net 2008 express
我正在使用 vb.net 2008 express
thanks
谢谢
回答by Eddie
I might be mis-understanding your question/issue, apologies if so..
in your first line.. you have the redirect_uri set to just go back to facebook, whereas it's supposed to be the URI of the page on your site that you want facebook to send the user to after they authenticate and approve your app, no?
我可能误解了您的问题/问题,如果是这样,我很抱歉……
在您的第一行中……您将 redirect_uri 设置为仅返回到 facebook,而它应该是您想要的网站页面的 URI facebook 在用户验证并批准您的应用程序后将其发送给用户,不是吗?
in other words shouldnt your first line be:
换句话说,你的第一行不应该是:
https://www.facebook.com/dialog/oauth?client_id=xxxxxxxxxxxxx&redirect_uri=**https://WWW.YOURDOMAIN.COM/YOURPAGE.ASPX**&display=popup&scope=publish_stream,user_status&response_type=token
after the user clicks "okay" on the popup, it will then redirect them to YOURPAGE.ASPX on your site, passing the access_token
用户在弹出窗口中单击“确定”后,它会将它们重定向到您网站上的 YOURPAGE.ASPX,并传递 access_token