Facebook的重定向URL问题OAuthException [英] Facebook redirect url issue OAuthException

查看:2747
本文介绍了Facebook的重定向URL问题OAuthException的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的应用程序运行良好了很长一段时间,但现在我正在从Facebook说法错误:

My app was working well for long time, but now I am getting the error from Facebook saying:

内容:{错误:{消息:错误验证验证code请确保您的REDIRECT_URI等同于你在OAuth对话请求中使用的一,键入:OAuthException,code:100}}

<$c$c>https://www.facebook.com/dialog/oauth/?client_id=163840537126360&redirect_uri=http://mycloud.niranjan.com/facebook/callback//empty/?vTitle=Facebook&scope=email,sms,user_about_me,friends_about_me,user_activities,friends_activities,user_birthday,friends_birthday,user_education_history,friends_education_history,user_events,friends_events,user_likes,friends_likes,user_location,friends_location,user_photos,friends_photos,user_videos,friends_videos,user_relationships,friends_relationships,user_status,friends_status,user_checkins,friends_checkins,read_stream,publish_stream

任何人都可以提出这一个一个解决方案?

Can anyone suggest a solution for this one?

推荐答案

我意识到这6周晚了,但我想,因为我发现,对我们的工作修复我会在这里张贴此。有同样的问题,并试图连接code中的返回URL(没有工作)之后,我意识到,我们正在建立我们的网址,如:

I realize this is 6 weeks late, but I figured I'll post this here since I found a fix that worked for us. Had the same issue and after trying to encode the return url (which did not work), I realized that we were building our URL like:

$url = "http://example.com/";
$redirect_script = "/cgi-bin/redirect.cgi";

$redirect_url = $url . $redirect_script;

然而,这导致了一个看起来像 http://example.com//cgi-bin/redirect.cgi 返回URL - 请注意//之后example.com。当我从这个URL删除双斜线,它再次工作。 OP,我看到你的重定向URL在 / Facebook的/回调//空是一回事吗?等等我相信这是什么搞乱它。

However this resulted in a return URL that looked like http://example.com//cgi-bin/redirect.cgi -- note the "//" after example.com. When I removed the double-slashes from this URL, it worked again. OP, I see that your redirect URL has the same thing in /facebook/callback//empty?etc which I believe is what's messing it up.

这篇关于Facebook的重定向URL问题OAuthException的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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