Iframe app opens without Facebook Canvas

Oct 31, 2009 at 8:10 AM

Hello,

My app opens in facebook and works fine normally. 

 

The problem is that the hyperlinks in the application show the url as http://mydomain.com/page1.aspx

And when I access this url directly or right click on the hyperlink and open it in new tab/window then the page opens without the facebook canvas page.

 

Why does this happen and how to rectify it?

 

Oct 31, 2009 at 8:37 AM

Hello just add target="_top" as attribute of your link.

Oct 31, 2009 at 11:42 AM

 

Hi,
Thanks for the reply. I first tried that  but it didn't work like that:
<a href="mypage.aspx" accesskey="u" target="_top">User Details</a>
So, I changed the URL of the page relative to facebook, like this:
<a href="http://apps.facebook.com/myapp/mypage.aspx" target="_top">User Details</a>
This worked !! but now my problem is that my application pages appear inside a frame. If anyone right clicks and selects open frame in a new tab, he again gets the page outside the facebook frame!! What should I do to restrict this behavior?

Hi,

 

Thanks for the reply. I first tried that  but it didn't work like that:

<a href="mypage.aspx" accesskey="u" target="_top">User Details</a>

 

So, I changed the URL of the page relative to facebook, like this:

<a href="http://apps.facebook.com/myapp/mypage.aspx" target="_top">User Details</a>

 

This worked !! but now my problem is that my application pages appear inside a frame. If anyone right clicks and selects open frame in a new tab, he again gets the page outside the facebook frame!! What should I do to restrict this behavior?