CodeIgniter Forums
Facebook App - having trouble with query string - 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 App - having trouble with query string (/showthread.php?tid=36817)



Facebook App - having trouble with query string - El Forum - 12-15-2010

[eluser]Samuurai[/eluser]
Hi,

Facebook requires that I set a trailing slash for the Canvas URL, but when I go to access my App, it says:

Quote:Application temporarily unavailable

Received HTTP error code 404 while loading http://dev.myurl.com/fb/render_store/?fb_page_id=110948575598304

Sorry, the application you were using is experiencing a problem. Please try again later.

I know the problem lies with the "?" because if I remove it, the page loads when I go to the URL directly.

render_store() is set up like this:
Code:
render_store($fbId = NULL)

Any ideas?


Facebook App - having trouble with query string - El Forum - 12-15-2010

[eluser]vitoco[/eluser]
You're getting the things wrong, when you call a url like :
Code:
http://site.com/controller/method/param1/../paramN?var=value

var=value gets deleted cause it's a $_GET var, and $fbId will only get a value from the url when the third segment of the url , e.g param1 have a value
Code:
// http://dev.myurl.com/fb/render_store/1
// $fbId => 1
render_store($fbId = NULL)

a way to regenerate $_GET in this kind of app ( i use this method in a facebook app ) is to use a 'post_controller_constructor' hook and do this :
Code:
parse_str($_SERVER['QUERY_STRING'], $_GET );
and then get the value of $fbId directly from $_GET ( and obviously sanitize it )
Saludos


Facebook App - having trouble with query string - El Forum - 12-15-2010

[eluser]Samuurai[/eluser]
Brilliant, thanks Smile


Facebook App - having trouble with query string - El Forum - 12-20-2010

[eluser]Samuurai[/eluser]
In my case, I had to change the uri_protocol to PATH_INFO in config.php


Facebook App - having trouble with query string - El Forum - 12-20-2010

[eluser]vitoco[/eluser]
the uri_protocol depends on the server config...


Facebook App - having trouble with query string - El Forum - 06-21-2011

[eluser]alphabase[/eluser]
Hi,

I'm sorry to bring up this topic again, but it seems this problem is also occuring in my apps with the newest CI and FB SDK.
I'mm quite new to CI, is there a possibility you give me a little more clarified example on how to fix this?

With kind regards,

Gerard Nijboer


Facebook App - having trouble with query string - El Forum - 06-21-2011

[eluser]Samuurai[/eluser]
Try this: http://www.quoture.com/facebook/cant-ad-an-fbml-facebook-app-to-a-tab


Facebook App - having trouble with query string - El Forum - 06-21-2011

[eluser]alphabase[/eluser]
Hi!

Great response time, thanks!
I'm trying to implement Facebook Connect into my own website, without the use of Apps or Canvas.
So I guess this doesnt work for my site..?

Got any other idea? Perhaps a proven framework for the latest versions?

Gerard