FB.ui在我的应用程序iFrame中渲染iFrame
FB.ui renders iFrame inside my app iFrame
当我试图呈现一个对话以要求用户在墙上发帖时,对话iframe在我的应用程序iframe中呈现,它隐藏了一半的对话:(
你可以在这里找到截图http://img59.imageshack.us/img59/3076/dialogueq.jpg
通常,它应该显示为灯箱,并且应该在应用程序iFrame外部呈现。
FB.ui(
{
method: 'feed',
message: 'Gain points and prizes with '+pageName ,
name: 'Visit our mobile community',
caption: pageName,
description: desc,
link: 'http://mydomain.com/generateLink?pageId='+pageId,
picture: 'http://mydomain.com/public/img/Logo.png',
user_message_prompt: 'Share your thoughts about '+ pageName +' and gain points.'
},
function(response) {
postedOnFb = true;
if (response && response.post_id) {
}
}
);
有人遇到过类似的问题吗?
提前感谢
facbook js-sdk提供的所有facebookui体验都在iframe中呈现。由于这意味着在画布页面和网站上都可以使用,所以它没有考虑到你的页面在facebook内部的事实。更重要的是,如果它试图做到这一点,可能会出现一些安全问题,如果它成功了,它可以为人们提供一个做XSS的好机会。
由于您的应用程序位于页面内,而且看起来您使用的屏幕分辨率较小,因此我建议您尝试在弹出版本中显示此对话框。我同意,它没有那么光滑,但嘿,至少用户可以看到所有的。
要在弹出窗口中打开对话框,请指定"显示"参数,如下所示:
FB.ui(
{
method: 'feed',
display: 'popup',
message: 'Gain points and prizes with '+pageName ,
name: 'Visit our mobile community',
caption: pageName,
description: desc,
link: 'http://mydomain.com/generateLink?pageId='+pageId,
picture: 'http://mydomain.com/public/img/Logo.png',
user_message_prompt: 'Share your thoughts about '+ pageName +' and gain points.'
},
function(response) {
postedOnFb = true;
if (response && response.post_id) {
}
}
);
你可以在这里阅读更多信息:http://developers.facebook.com/docs/reference/javascript/FB.ui/
相关文章:
- 如何在Facebook上的iframe应用程序中使后退按钮返回到上一页
- Protractor:在Iframe中测试非角度应用程序
- 在移动应用程序上滚动iframe会在某个时刻跳到页面顶部
- IFRAME和谷歌应用程序脚本中的NATIVE模式
- iframe响应为302时重新加载应用程序
- IFRAME沙盒中的Google OAuth2和应用程序脚本
- 如何记录Apache Cordova应用程序中加载的iframe的http响应
- 在asp.net mvc应用程序中的iframe中呈现部分视图
- 正在Iframe中打开Express应用程序
- iFrame - 在 Web 应用程序中实现 Iframe 的成本
- 为什么IE不支持在现有应用程序中使用的iFrame js和css文件
- 在 KnockoutJS 应用程序中将 AngularJS 应用程序作为 iFrame 加载
- 如何定位“隐藏”的 iframe?(应用程序:链接到嵌入“隐藏的海报图像”嵌入的 Youtube 视频的起始位置)
- AngularJS应用程序不会在iframe中加载
- 如何删除 X-Frame-Options 响应标头,允许应用程序被 iframe
- 来自一个外部站点的 Javascript 应用程序不在 iframe 中运行
- Iframe应用程序JavaScript SDKpublish对话框错误(代码102)
- 使用FB后,不能在iframe应用程序中编辑输入字段.登录Firefox浏览器
- Facebook Iframe应用程序-提示安全内容,虽然我已经安装了SSL
- Facebook iframe应用程序YouTube嵌入错误不安全的javascript