FB Iframe 应用程序:根据用户是通过我的网站还是通过 Facebook 查看应用程序,使用不同的样式表

发布于 2024-09-27 23:32:34 字数 312 浏览 2 评论 0原文

我正在开发一个 Facebook 应用程序,可以在 Facebook 本身的 iframe 中查看,或者作为独立网站查看(Facebook Connect 和 iframe 应用程序之间的界限似乎已经模糊......)。

我现在的样式表在我的网站上看起来不错,但通过 FB iframe 查看时看起来不太正确(可能是因为浏览器屏幕比 iframe 大得多)。 我想根据用户是否实际访问我的网站或通过 Facebook 访问应用程序来使用不同的样式表。

我该如何执行此操作?

(我正在使用 Ruby on Rails 和 Facebooker2)

I'm developing a facebook app which can be viewed in an iframe on Facebook itself, or as a standalone site (the line between Facebook Connect and iframe apps seems to have blurred...).

The stylesheet I have now looks good on my site, but doesn't look right when viewed through the FB iframe (probably b/c the browser screen is much bigger than the iframe).
I'd like to use different stylesheets depending on whether the user is actually visiting my website, or accessing the app through Facebook.

How can I do this?

(I'm using Ruby on Rails, and Facebooker2)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

伴随着你 2024-10-04 23:32:34

当 Facebook 被视为应用程序发送一堆额外的请求参数时,您可以在服务器端检查这些参数。

When it is viewed as an app facebook sends a bunch of extra request parameters, you can check for those on server side.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文