Welcome Guest, Not a member yet? Register   Sign In
CodeIgntier and facebook developer, fb iframe help please.
#1

[eluser]searain[/eluser]
I am trying to develop this facebook application

http://apps.facebook.com/locationanddirection/

The url is

http://cifacebook.foliosystems.ca/ (which is a ci site)

I used fb iframe in the application, the src of the iframe is pointing to a google_map application. http://cifacebook.foliosystems.ca/google_map

<fb:iframe src="http://cifacebook.foliosystems.ca/google_map" smartsize=true></fb:iframe>

And somehow I have to set up $config['uri_protocol'] = "ORIG_PATH_INFO"; to make the whole thing working.

OK, here is the problem.

1) when it is working, the facebook application would stay at url http://apps.facebook.com/locationanddirection/, it will display your friends and google map.

2) but my problem is once a while, I didn't change the google map code, the facebook application would act funny, and the url shows in the browser would become http://cifacebook.foliosystems.ca/google_map (instead of it should be just a iframe src in the page). And when this happens, it is in a loop like keep on receiving url in traditional format from facebook, but due to it is CI page, it doesn't understand the url in traditional way, so the result is it keeps on receiving traditional url from facebook and stay like that.

But in the <fb:iframe src="http://cifacebook.foliosystems.ca/google_map" smartsize=true></fb:iframe>

if I made src point to a same google application but not on CI site, it is no problem.

I am not sure if any one understands my problem here. Maybe you have to be there to know that.

In simple words, in fb iframe, I made src pointing to a CI page. Due to facebook would somehow communicate with my site with url in traditional way, I have to play with the $config['uri_protocol'] = "ORIG_PATH_INFO"; (in my case, ORIG_PATH_INFO works, in other people's case, PATH_INFO works). But once a while, same set up, facebook would function differently even I didn't change the set up.

It has something to do with iframe src pointing to a codeigniter page, and config['uri_protocol'] set up, and the stability of the facebook server.

I have posted this in facebook forum too. But it seems only happens to the ci page as the fb iframe src, hope some ci developer had the same situation can help me out here.

And if that is a problem, should I use ci in facebook application? any one had experience before what to share their advices?

Thanks!
#2

[eluser]searain[/eluser]
OK, I have to add this line to MY_Controller

parse_str($_SERVER['QUERY_STRING'],$_GET);

I found it from some threads. If I remove this line, the facebook application sometimes works, sometimes doesn't (maybe cached).

It seems if I bring this line back, it always works.

Not quit clear about the CodeIgniter logic behind this. But it works. Anyone can explain?




Theme © iAndrew 2016 - Forum software by © MyBB