Welcome Guest, Not a member yet? Register   Sign In
Facoock Application development using Codeigniter - Problems with GET and CI's way of routing
#1

[eluser]Unknown[/eluser]
Hi all!

I'm trying to start a project in codeigniter, which will be a Facebook Iframe/Canvas application. I had been following some guides and after several tries and some research, I finally find out (more or less) what's wrong, but I've no idea on how to fix it.

Ok, let's start from the beggining. I've followed this two guides

Create Facebook Applications with Codeigniter

A sample Facebook Application with Codeigniter

And in both cases, my CI says "error 404, peage not found" when trying to load it inside of the Iframe that facebook provides for our apps. Doing several tries and modifications i find out that CI gets confused when reciving al fb_session strings, which are passed by GET :

It tries to load something like this in the iframe:

Code:
http://www.example.com/index.php/welcome/?session=�"uid":D4412891874","session_key":"2.EJx78EIVEPrrzKrPUgt0Yw__.3700.1288713600-1152891874","secret":"6K_zazL_ck2wfIdJxcVhuA__","expires":
1288713600,"access_token":"120804284647330|2.EJx78EIVEPrrzKrPUgt0Yw__.3600.1288713600-1152891874|pgBgd_9XINU9d4r0dQrJEoKRB-Q","sig":"3f22ad14fc5b9534b31c1d4e3199d85e"}

I've found a solution, that is to set enable_query_strings to true and add the following to the canvas callback url in Facebook Application configuration:

Code:
http://www.example.com/index.php?c=controller

And that seems to be working, but I would prefer not to use this solution, since CI "can" use it, but it's not recommended.

Any help or extra info if somebody had the same issue, would be greatly appreciated!




Theme © iAndrew 2016 - Forum software by © MyBB