0

I'm using PHP SDK for Facebook in CI and all works well except in the facebook login. I set the redirect_url to 'http://mysite.com/index.php' so that facebook will redirect back to the home page after login. The problem is that when redirecting, facebook adds a query string like so: http://mysite.com/index.php?status=xxxx&code=xxxx and since my $config['enable_query_strings'] is set to false, it doesn't work. How can I get around this? I do not want to enable the query strings in CI.

Please help.

Esthon Wood
  • 315
  • 3
  • 19
  • What doesn't work? what error do you get? Query_strings is not related to this matter. Read here: http://codeigniter.com/user_guide/general/urls.html – Yan Berk Jun 02 '12 at 10:12

2 Answers2

0

You could try this : my config.php file is

$config['allow_get_array'] = TRUE;
$config['enable_query_strings'] = FALSE;

this is my controller and its work for me :

$myurl = "http://mysite.com/index.php";

redirect($this->facebook->getLoginUrl(array('scope' => 'email', 'redirect_uri' => $myurl)));
Syed Ahmed
  • 1,635
  • 2
  • 16
  • 23
0

Thanks for the replies guys. Apparently, it's a jQuery mobile bug, not CI. Found the answer here: Facebook Oauth Login With Jquery Mobile #_=_

Community
  • 1
  • 1
Esthon Wood
  • 315
  • 3
  • 19