天道酬勤,学无止境

facebook-iframe

iframe-based facebook app gets unwanted scroll bars with a smaller windows size

问题 我有这个 Facebook 应用程序配置文件页面: http://www.facebook.com/developers/editapp.php?app_id=122313254494566#!/apps/application.php?id=122313254494566 这与我基于 iframe 的 Facebook 应用程序 Gem Spinner 相关联: http://apps.facebook.com/gemspinner/ 我看到的是,根据窗口高度,我的 iframed 内容将以固定高度和滚动条出现,而不是像我一样顺着页面向下流动(必要时从页面底部流出)想。 当我缩短窗口时,会出现滚动条; 当我使窗口更高时,滚动条消失。 我的理解是 Facebook 确定了这个高度并添加了滚动条(但也许我错了)。 无论如何,我将不胜感激任何帮助理解这一点并让我的内容在必要时顺着页面向下流动。 回答1 好吧,我做了一些事情来让它工作。 (1) 在我的应用程序设置中,在 Facebook 集成选项卡下的 IFrame 大小下,我选择了自动调整大小而不是显示滚动条。 (2) 我加载了 Facebook 连接 API(见下面的代码)。 (3) 我在两个不同的地方调用了 FB.Canvas.setAutoResize(100)。 我调用了两次,因为我不清楚哪个位置可以更快地生效。

2022-05-15 19:49:04    分类:技术分享    facebook   iframe   scrollbar   facebook-iframe

iframe-based facebook app gets unwanted scroll bars with a smaller windows size

I have this Facebook application profile page: http://www.facebook.com/developers/editapp.php?app_id=122313254494566#!/apps/application.php?id=122313254494566 which is associated with my iframe-based Facebook application, Gem Spinner: http://apps.facebook.com/gemspinner/ What I'm seeing is that, depending on the window height, my iframed content will appear with a fixed height and a scroll bar, instead of just flowing down the page (and off the bottom of the page, as necessary), as I would like. When I make the window shorter, the scroll bar appears; when I make the window taller, the scroll

2022-04-30 10:44:18    分类:问答    facebook   iframe   scrollbar   facebook-iframe

Display thumbnail image in iframe

问题 我在这方面相当新。 我有以下iframe <iframe width="560" height="315" src="<%=video1[1]%>" frameborder="0" allowfullscreen></iframe> 我想做的是让它播放video1[1] ,但显示video1[2]中的图像。 我尝试做的是: <iframe width="560" height="315" href="<%=video1[2]%>" src="<%=video1[1]%>" frameborder="0" allowfullscreen></iframe> 但这不起作用。 有没有简单的方法呢? 回答1 iFrame 标签中没有“href”属性。 见:http://www.w3schools.com/tags/tag_iframe.asp 您也许可以构建一个 iFrame 作为链接的目标: <iframe width="560" height="315" src="<%=video1[1]%>" frameborder="0" allowfullscreen name="iframe_video1"></iframe> <a href="<%=video1[2]%>" target="iframe_video1"><img src="<...>"/></a> 顺便说一句:请注意

2022-04-29 16:42:03    分类:技术分享    java   html   iframe   embed   facebook-iframe

How to display iframe by a Javascript snippet?

问题 我在网上看到了一些小部件,它们使用户可以在自己的页面中包含一个简短的 Javascript 片段,执行时会显示一个 Iframe,如下例所示。 <div id="fb-root"></div><script src="http://connect.facebook.net/en_US/all.js#appId=APP_ID&xfbml=1"></script><fb:facepile></fb:facepile> 我怎样才能自己做到这一点 - 在我的服务器上有一个 javascript,当在远程服务器上调用时,它会写出 iframe 或将内容加载到他们的页面中? 回答1 传统方式(考虑有点混乱;不适用于 XHTML-as-XML 主机页面;如果在页面加载后通过异步调用,将炸毁整个页面): document.write('<iframe src="http://www.example.com/myframe" width="100" height="100"></iframe>'); 或者使用innerHTML到页面上具有预定义名称的元素: document.getElementById('examplecomframe').innerHTML= '<iframe src="http://www.example.com/myframe" width="100" height=

2022-04-29 12:38:03    分类:技术分享    javascript   dom   iframe   facebook-iframe

How to display iframe by a Javascript snippet?

I have seen some widgets online that gives the user the possibility of including a short Javascript snippet in their own page, which when executed displays an Iframe, like in the following example. <div id="fb-root"></div><script src="http://connect.facebook.net/en_US/all.js#appId=APP_ID&amp;xfbml=1"></script><fb:facepile></fb:facepile> How can I do this by myself - have a javascript on my server, that when called on a remote server, writes out an iframe or loads content into their page?

2022-04-06 04:47:39    分类:问答    javascript   dom   iframe   facebook-iframe

Why are these wierd characters being inserted in Facebook iframe when using jQuery? ​ [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 9 years ago. jQuery parses some html in my iframe app on Facebook, and when it does, I get tons of these characters: ​ ​​​​​​​​​​​​​ Please see screenshot for more info. Does anyone know why this occurring! and how to fix it? screenshot showing problem - note how it is randomly inserted into inline

2022-03-23 01:44:32    分类:问答    javascript   jquery   css   facebook   facebook-iframe

FB JavaScript iframe application is not auto redirecting to FB login page if no session available

I am developing facebook iframe app with JavaScript.. the problem is when the user hits the app URL https://apps.facebook.com/projectanida/ I want users to see the application main page if they are already logged into fb and if there is no user session available then the user should be automatically directed to FB page asking for credentials to log into Facebook to use my app. Here is the code : var href = "https://projectafacebook.appspot.com/fb/"; var appliId = "165346656890746"; window.fbAsyncInit = function() { FB.init({ appId: '165346656890746', status: true, // check login status cookie

2022-03-22 04:31:04    分类:问答    facebook   facebook-graph-api   redirect   facebook-javascript-sdk   facebook-iframe

Display thumbnail image in iframe

I am fairly new in this. I have the following iframe <iframe width="560" height="315" src="<%=video1[1]%>" frameborder="0" allowfullscreen></iframe> What I am trying to do is have it play video1[1], but show the image that is in video1[2]. I tried doing is: <iframe width="560" height="315" href="<%=video1[2]%>" src="<%=video1[1]%>" frameborder="0" allowfullscreen></iframe> but that doesn't work. Is there a simple way of doing it?

2022-03-14 06:42:36    分类:问答    java   html   iframe   embed   facebook-iframe

Chrome-only cross-domain scripting errs in Facebook iFrame App upon FB.Login(..)

In Google Chrome (I'm on 9.0.597.98) my Facebook iFrame app using Graph API/Javascript SDK tends to always throw the following two JavaScript errors (see below) based on cross-domain scripting, but only on one page of the app. It goes into an endless retry loop on the second message. After leaving it overnight, it reported a half million retries by this morning! The FB call being used is for login: FB.login(function(response) { if (response.session) { // user successfully logged in } else { // user cancelled login } }); In Firefox and IE9 I do not get these errors. It's specific to Chrome

2022-03-13 00:17:19    分类:问答    javascript   google-chrome   facebook-iframe   facebook-javascript-sdk