I'm making an app on facebook and have chosen iframe instead of FBML. The problem i'm facing is linking to various other pages of the app. Suppose that I've hosted my app here http://fbapp.mysite.com and I want to link http://fbapp.mysite.com/page1, how should I do that inside the iframe? Linking directly to fbapp.mysite.com/page1 just redirects the whole browser window from facebook.com to fbapp.mysite.com. I still want the app to very much "live" inside the canvas page, but want to navigate to a page1. Any help will be appreciated.
A:
Try setting window.location instead of redirecting or set "page1" as your default page in IIS or whatever you use.
Chris Ballance
2009-02-27 14:57:26
Reason for DV? .
Chris Ballance
2010-01-09 22:30:11
A:
Thanks for the reply, but I dont know if redirect is the right way to do this, it sounds more like a work around. FB should be having a standard solution to this problem, its just that I'm not able to find it on its documentation page. Anyone who has worked on FB applications should be able to answer this, I'm just hoping they stumble onto this question.
Swamy g
2009-02-27 17:19:25
+8
A:
Instead of
<a href="http://fbapp.mysite.com/page1">link</a>
Use
<a href="http://apps.facebook.com/{canvasurl}/page1" target="_top">link</a>
This will load the URL in the topmost frame (Facebook itself), and Facebook automatically passes through any arguments (paths AND query strings) to your callback URL.
Portman
2009-02-28 17:02:39
A:
FB_RequireFeatures(["CanvasUtil"], function() {
FB.Facebook.init(<api_key>, <path to xd_receiver>);
FB.CanvasClient.startTimerToSizeToContent();
FB.CanvasClient.syncUrl();
});
Miha
2010-02-09 11:42:45