Open application from Page tab in full width

2019-09-12 15:34发布

问题:

I have created a Page for my Facebook canvas application and there added a new tab that displays the login page for the application. However, when a user clicks the login button, I would like to open the application (http://apps.facebook.com/amiinteresting) in "full screen", not inside IFrame of the page. The reason is that my application requires more width than can fit within a page tab.

Is this possible to accomplish with JavaScript or in some other way?

Here are a couple of images to describe the problem and the desired behavior:

Application displayed on page tab (current behavior - not what I want):

Application displayed in a new window (this is what I want):

Thank you in advance!

回答1:

For your specific requirement, assuming you have an <a> tag as the button, just specify the property target = '_top' , which will open the link in the top level, i.e change the browser address, so your link will be :

<a href="http://apps.facebook.com/amiinteresting" target="_top">Go to application</a>

Hope this helps.