开发者

Facebook Iframe Issue

开发者 https://www.devze.com 2023-01-19 21:44 出处:网络
I am working on an iframe based Facebook applicaton.I am able to use FB.Canvas.setAutoResize(); to let the iframe \"stretch\" the page 开发者_如何学JAVAso there\'s no scroll bar for the iframe.The pag

I am working on an iframe based Facebook applicaton. I am able to use FB.Canvas.setAutoResize(); to let the iframe "stretch" the page 开发者_如何学JAVAso there's no scroll bar for the iframe. The page may be 2-3 page-length in height. I can scroll down the page using the windows scroll bar. The issue is when I am at the bottom of the page and I click a link inside the frame, the content in the frame loads but I am still at the bottom of the page. Is there a way to set it so that when the link inside the frame is clicked, the outer page will scroll back up to the top of the page so you can see the content of the frame at the top? Mike


The best solution I've found is to make sure any links below the fold target '_top' and href 'apps.facebook.com/appname/?whatever'. In essense, you're reloading the FB chrome on every click.

This has the added benefit of sending new access_tokens more often.

UPDATE: Facebook announced today that this now works: FB.Canvas.scrollTo(0,0);

0

精彩评论

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