Welcome Guest, Not a member yet? Register   Sign In
Facebook App - having trouble with query string
#1

[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...8575598304

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?
#2

[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
#3

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

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

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

[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
#7

[eluser]Samuurai[/eluser]
Try this: http://www.quoture.com/facebook/cant-ad-...p-to-a-tab
#8

[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




Theme © iAndrew 2016 - Forum software by © MyBB