Losing the facebook frame.

Jul 23, 2007 at 3:10 PM
Hi guys

every so often my app loses the facebook frame when I navigate and it becomes a standalone facebook app, still logged into facebook but not contained within facebook anymore...

Any ideas on what would cause this?

thanks in advance

Jo
Coordinator
Jul 24, 2007 at 10:09 PM
Sounds like the same problem that HT is having.

I plan to do some more testing tomorrow. If you know how to reproduce and can tell me the exact steps. That would be very helpful.
Jul 24, 2007 at 11:07 PM
Hi,

I have been experiencing the same problem.

When a user accesses my application that uses CanvasIframeBasePage v1.2 and they stop interacting with the application, just leaving the page loaded in the browser and leave it for about 20 minutes and then click on a link or a button to interact with the page the page requests a new auth_token and then loses the facebook frame.

Could this have anything to do with session expiring? I've tested different durations of the page sitting idle and then interacting with it and it seems 20 minutes is the magic number.

Jul 25, 2007 at 1:08 AM
I use to have this problem all the time. I haven't been following how CanvasIFrameBasePage is implemented so cannot speak directly to that, but this was my experience.

I used an iFrame and set the FB app to iFrame. When the app called my app, I bounced the user back so I can get an authentication token. Every once in a while, the frame would be lost if I needed to go back and get another token. I ended up setting the app to FBML with the following code:

<div id="wrapper" style="width: 100%; height: 1200px;">
<fb:if-is-app-user>
<fb:iframe src="http://www.YOURWEBSITE.com/Canvas.aspx" smartsize="false" frameborder="false" style="border: 0; width: 100%; height: 100%;" scrolling="no"/>
</fb:if-is-app-user>
</div>

Since it is an iframe within FBML, my canvas page gets a session key and now I no longer need to go back to FB.

Note that my app is still under heavy testing so I'm not sure if all the redirect issues have been resolved.

I got this method from this thread:
http://www.facebook.com/topic.php?uid=2205007948&topic=8279
Coordinator
Aug 7, 2007 at 2:47 AM
I have been able to reproduce, but don't have a solution yet. I am adding an issue for this.
Aug 9, 2007 at 6:20 AM


MrBlue wrote:
I use to have this problem all the time. I haven't been following how CanvasIFrameBasePage is implemented so cannot speak directly to that, but this was my experience.

I used an iFrame and set the FB app to iFrame. When the app called my app, I bounced the user back so I can get an authentication token. Every once in a while, the frame would be lost if I needed to go back and get another token. I ended up setting the app to FBML with the following code:

<div id="wrapper" style="width: 100%; height: 1200px;">
<fb:if-is-app-user>
<fb:iframe src="http://www.YOURWEBSITE.com/Canvas.aspx" smartsize="false" frameborder="false" style="border: 0; width: 100%; height: 100%;" scrolling="no"/>
</fb:if-is-app-user>
</div>

Since it is an iframe within FBML, my canvas page gets a session key and now I no longer need to go back to FB.

Note that my app is still under heavy testing so I'm not sure if all the redirect issues have been resolved.

I got this method from this thread:
http://www.facebook.com/topic.php?uid=2205007948&topic=8279


Ok, how did you get the session key in your canvas page_load when it is embedded inside <fb:iframe>? My canvas page needs to get information about the user but am unable to find a way to get the session key. My canvas page subclasses CanvasIFrameBasePage and it just says my session key is invalid or is no longer valid. I checked and the session key is "null" when the page loaded.

thanks!
Aug 24, 2007 at 7:24 PM
just wanted to say that I am having the same problem...