views:

406

answers:

2

I'm currently having issues with my Facebook app being ported to CI from raw PHP.

The issue I'm having is that I have a CI driven redirect:

function signedin()
{
 echo "signed in?";
}

function save_user_data()
{
 $insert['uid'] = $_POST['uid'];
 $this->db->insert('users', $insert);
 redirect('signedin');
{

Based upon how all of the urls are setup, the function "save_user_data" is accessed by

www.apps.facebook.com/my_app_name/save_user_data

So I'd think the redirect would go to

.../my_app_name/signedin

but instead I get the error

The URL http://apps.facebook.com/my_app_name/index.php/signedin is not valid.

So it's adding in the index.php somewhere. Is this a Facebook addition, or a CodeIgniter one?

FWIW, the URLs that access this from the web are being changed. I'm using the default controller in CI (welcome) so my Facebook canvas page is set as

www.mywebsite.com/index.php/welcome/

And www.mywebsite.com/index.php/welcome/signedin is the page I want to redirect to.

I have been at this a bit too long maybe and am not seeing the error here, but would love some help!

Thanks a lot.

A: 

index.php/controller is how CI works .. so when u redirect index.php is a given .. unless u put in the full path

maybe use mod_rewrite to adjust ur urls?

Sabeen Malik
A: 

I ended up just changing $config[‘index_page’] = “”; That did it. Sorry for the newbie question

Alex Mcp