Facebook无限循环

时间:2012-08-16 07:48:24

标签: php .htaccess codeigniter

我一直在谷歌这个并查看stackoverflow的答案,但还没有发现任何对我有用的东西。

我已经在下面检查了!用户可能已禁用c​​ookie,我已经尝试过这个并且在多个浏览器中遇到同样的问题。

我正在使用facebook sdk进行第三方登录,但我运行代码的所有内容我都得到以下内容

The webpage at https://www.facebook.com/login.php?api_key=466044326753518&cancel_url=http%3A%2F%2Fexample.users36.interdns.co.uk%2Fconnect_facebook&display=page&fbconnect=1&next=http%3A%2F%2Fexample.users36.interdns.co.uk%2Fconnect_facebook&return_session=1&session_version=3&v=1.0&req_perms=user_birthday has resulted in too many redirects. Clearing your cookies for this site or allowing third-party cookies may fix the problem. If not, it is possibly a server configuration issue and not a problem with your computer.

以下是为网址生成的网址

https://www.facebook.com/login.php?api_key=466044326753518&cancel_url=http%3A%2F%2Fexample.users36.interdns.co.uk%2Fconnect_facebook&display=page&fbconnect=1&next=http%3A%2F%2Fexample.users36.interdns.co.uk%2Fconnect_facebook&return_session=1&session_version=3&v=1.0&req_perms=user_birthday

我尝试过很多选项但似乎没什么用。我正在使用codeigniter,我将我的uri_protocol设置为auto

$config['uri_protocol'] = 'AUTO';

如果我将它设置为PATH_INFO则可以正常工作

$config['uri_protocol'] = 'PATH_INFO';

这让我抓狂,因为这意味着我必须将所有我的网址都留给index.php这里是我的.htaccess

    Options         +FollowSymLinks
Options         -Indexes 
DirectoryIndex  index.php
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]  

<Files "index.php">
AcceptPathInfo On
</Files>  

我已经读过我的托管可能不支持path_info?

任何人都可以对此有所了解我也会联系我的主持人。

由于

更新它是从chrome中的网络选项卡重定向这两个网址。

http://example.users36.interdns.co.uk/connect_facebook?session=%7B%22session_key%22%3A%222.AQDZt8rGtuhgss40.3600.1345111200.0-680410999%22%2C%22uid%22%3A%22680410999%22%2C%22expires%22%3A1345111200%2C%22secret%22%3A%22CCHtz17wmFCRRNApLUM6zQ__%22%2C%22base_domain%22%3A%22http%3A%5C%2F%5C%2Fexample.users36.interdns.co.uk%5C%2F%22%2C%22access_token%22%3A%22AAAGn3WaLtO4BAFA8HOMbdJY1ouKwIZCIfOxHqnJEjU2beEkARUeQIJ24J3Qsw93UWJSPJF7qGorkBXWeaP0TlBV2UKWuBvrjqIn2jJgZDZD%22%2C%22sig%22%3A%220e7a4c9d172006abc642756617cbe058%22%7D

https://www.facebook.com/login.php?api_key=466044326753518&cancel_url=http%3A%2F%2Fexample.users36.interdns.co.uk%2Fconnect_facebook&display=page&fbconnect=1&next=http%3A%2F%2Fexample.users36.interdns.co.uk%2Fconnect_facebook&return_session=1&session_version=3&v=1.0&req_perms=user_birthday

当我将它设置为path_info时,它可以工作,这是网络响应

https://www.facebook.com/login.php?api_key=466044326753518&cancel_url=http%3A%2F%2Fexample.users36.interdns.co.uk%2Findex.php%2Fconnect_facebook&display=page&fbconnect=1&next=http%3A%2F%2Fexample.users36.interdns.co.uk%2Findex.php%2Fconnect_facebook&return_session=1&session_version=3&v=1.0&req_perms=user_birthday

http://example.users36.interdns.co.uk/index.php/connect_facebook?session=%7B%22session_key%22%3A%222.AQDZt8rGtuhgss40.3600.1345111200.0-680410999%22%2C%22uid%22%3A%22680410999%22%2C%22expires%22%3A1345111200%2C%22secret%22%3A%22CCHtz17wmFCRRNApLUM6zQ__%22%2C%22base_domain%22%3A%22http%3A%5C%2F%5C%2Fexample.users36.interdns.co.uk%5C%2F%22%2C%22access_token%22%3A%22AAAGn3WaLtO4BAFA8HOMbdJY1ouKwIZCIfOxHqnJEjU2beEkARUeQIJ24J3Qsw93UWJSPJF7qGorkBXWeaP0TlBV2UKWuBvrjqIn2jJgZDZD%22%2C%22sig%22%3A%220e7a4c9d172006abc642756617cbe058%22%7D

0 个答案:

没有答案