开发者

How to check if the page is loading inside facebook canvas and change the layout accordingly

I'm working on creatin开发者_运维问答g flash games site and want to make the facebook application version of it. As the site width is bigger than canvas default width I'm trying to find the way to check if the site is loading inside facebook canvas and change the width accordingly. Please, help me to find the solution.


If a user accesses your site via your Facebook canvas iframe app, the request to your server will include a "signed_request" param. You can check for this param to determine if the user's inside the Facebook canvas or not.

Also note that you don't really need to do this anymore if you set the Canvas Width to Fluid:

You can set your Canvas Width to "Fixed (760px)", the default setting, which makes your app have a fixed width of 760 pixels. You can also set your width to "Fluid" which means that we set the iframe width to 100%. Your content will then be left-aligned and resize to fill the page as the user changes the width of their browser.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜