![]() |
Facebook Ignited Infinite Loop Problem - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Facebook Ignited Infinite Loop Problem (/showthread.php?tid=42863) |
Facebook Ignited Infinite Loop Problem - El Forum - 06-22-2011 [eluser]programmieraffe[/eluser] Hey Codeigniter-Folks, I have a problem using the facebook-ignited package. Webserver: MAMP + OSX 10.6.7 / PHP: 5.2.13 ( access via "local domain" [etc/hosts - local.mydomain.de, virtual host in MAMP/apache] ) Codeigniter Reactor: 2.0.2 CIBonfire: 1.0.1 Facebook-Ignited: 1.0.4 config/fb_ignited.php: Code: config/fb_ignited.php controller: Code: class welcomeFacebook extends Front_Controller{ The result is an infinite Loop with Chrome and Safari, both when logged in at facebook already or not... Code: oauth (www.facebook/com/dialog) 302 Found fb_get_me() (Fb_ignited) fails permanently, because $this->CI->facebook->getUser() does not return a user, so it redirects over and over again. I figured out, that there is no signed request. And that getUserFromAvailableData() (base_facebook.php) fails to get user data. The app-id and app_secret are fine, because i tested it with the javascript-sdk and it all worked well. How can i debug this? Is there a debug option for php-sdk / facebook-ignited? Or is it a codeigniter-cookie/session related problem? (Or is it something else? ![]() Thanks in advance for your help! Matthias Facebook Ignited Infinite Loop Problem - El Forum - 06-22-2011 [eluser]alphabase[/eluser] Having exactly the same issue, have seen your reply at Bitbucket. Looks like CI doesn't allow the query string, which is returned to by Facebook. But I've tried several options in the CI-config file, but no success. Alfonso (Facebook-Ignited) is planning a new release, but I guess this one should be working, too. Any suggestions? Facebook Ignited Infinite Loop Problem - El Forum - 06-22-2011 [eluser]programmieraffe[/eluser] Okay, I have one working solution: I had a htaccess file, to remove the index.php from the URI. (See below) If I remove this htaccess file and change the config.php to the following, it works: Code: $config['uri_protocol'] = 'AUTO'; htaccess file used before: Code: <IfModule mod_rewrite.c> But it would be nice if someone could help me out, that i can use clean urls (domain.com/controller/method), because i don't like this way: domain.com/index.php/controller/method. Facebook Ignited Infinite Loop Problem - El Forum - 06-22-2011 [eluser]osci[/eluser] in your config Code: $config['index_page'] = ''; Facebook Ignited Infinite Loop Problem - El Forum - 06-22-2011 [eluser]alphabase[/eluser] But then you need htaccess to rewrite those url's, right? And how? Facebook Ignited Infinite Loop Problem - El Forum - 06-23-2011 [eluser]programmieraffe[/eluser] I think the problem is the following: The facebook-api redirects to "domain.com/welcomeFacebook/?code=878908098&state=98989898". Without clean urls, the "?" is the first and is recognized properly. With clean urls and the rewrite rule (see below), there are two "?"-signs in the URI and so only the first one is recognized as parameter. ("domain.com/index.php?/welcomeFacebook/?code=dsflsadkflks&state=98790898") Code: RewriteRule ^(.*)$ index.php?/$1 [L] I don't have a easy solution right now to make this work, maybe the regular expression should be altered to check for "?" in the url? Facebook Ignited Infinite Loop Problem - El Forum - 06-23-2011 [eluser]toopay[/eluser] Change your htaccess to Code: RewriteEngine On and your config.php, look at Code: //$config['uri_protocol'] = 'AUTO'; Facebook Ignited Infinite Loop Problem - El Forum - 06-23-2011 [eluser]programmieraffe[/eluser] Yeah, I've tried that, but "/" gives an Internal Server Error, because slashes are for directories. But I have 2 solutions now: config.php - enable query strings Code: | Please note that some of the helpers won't work as expected when Or if you don't want to enable it global, paste this to your constructor or method: Code: parse_str($_SERVER['QUERY_STRING'],$getArr); I do not know if this causes some security issues... Facebook Ignited Infinite Loop Problem - El Forum - 06-23-2011 [eluser]toopay[/eluser] Did you try change uri protocol to 'PATH_INFO' in your config? Sometime you need that to get the "$_GET" param properly. No need to use query string, it will give you more troubles. Facebook Ignited Infinite Loop Problem - El Forum - 06-23-2011 [eluser]programmieraffe[/eluser] I've tried to use 'PATH_INFO', but this does not work for me. Will it really cause more trouble? Because i'm still using path segments for my url instead of ?c=controller. |