Welcome Guest, Not a member yet? Register   Sign In
Trying to find other ways to redirect (facebook + CI = pain)
#1

[eluser]coldclimate[/eluser]
I've been battling with this for a little while, and it's definetly a clash between FB and CI, not a CI problem, looking for any other ideas.

I have a form which submits to /search/results which grabs the POST variable, and then redirects to /search/results/what-you-searched-for (eg. the submitted [phrase rewritten with dashes for spaces). A route then picks this up and handles it using a function.

FB seems to get annoyed with the redirect, and I've tried everything I can think of. Anybody got any ideas on other ways to do a redirect (so I get "real" urls) other than this method?

http://apps.facebook.com/[myappname]/search/ submits to
http://apps.facebook.com/[myappname]/search/results which causes FB to spit out

Quote:Errors whilst loading page from application

The URL http://apps.facebook.com/wishlistoli/sea...arched-for is not valid.

Please try again later. We appreciate your patience as the developers of WishlistOli and Facebook resolve this issue. Thanks!

But then if you paste in http://apps.facebook.com/wishlistoli/sea...arched-for to the URL bar, the page renders just fine.

The code in search is as follows:
Code:
function results(){
            $searchQuery = $this->input->post('searchquery');
            $urlname=str_replace(" ", "-",$searchQuery);
                        //redirect('/search/results/' . $urlname . '/', 'refresh');    
                        //redirect('/search/results/' . $urlname . '/', 'location');    
                redirect('/search/results/' . $urlname . '/', 'location', 301);    
    }

Any ideas?
#2

[eluser]JohnnyAction[/eluser]
Have you found a solution to this problem? It sounds similar to the issue I'm having here: http://forum.developers.facebook.net/vie...?id=107409
#3

[eluser]coldclimate[/eluser]
I did but you won't like it.... I left the company shortly after. It was during a time when FB were transitioning so much stuff (canvas vs iframe, old API vs new etc) that everything was like pulling teeth.

Sorry fella, bets of luck.
#4

[eluser]JohnnyAction[/eluser]
Yikes, thanks anyway. I think I fixed it by re-copying all my CI files to the webserver. Since then everything seems to work okay.




Theme © iAndrew 2016 - Forum software by © MyBB