FB.ui在FB画布中不起作用。帮帮我! [英] FB.ui does not work inside FB canvas. HELP!
问题描述
此代码适用于独立的HTML文件,以及我的iframe FB应用的索引页。我正确地得到FB.ui框。
This code works in a standalone HTML file, as well as in the index page of my iframe FB app. I get the FB.ui box correctly.
但是,如果我从索引重定向到另一个页面,并且在那里有相同的代码,它不起作用。
我得到所有3个警报,但FB.ui不显示。帮助!
But if I redirect from index to another page, and have the same code there, it doesn't work. I get all 3 alerts, but FB.ui doesn't show up. HELP!
我尝试过两个显示:对话框并显示:弹出但不起作用:(
I've tried both display:'dialog' and display:'popup' but no effect :(
alert('1');
FB.init(
{
appId : 'MY_APP_ID',
status : true, // check login status
cookie : true, // enable cookies to allow the server to access the session
xfbml : true // parse XFBML
}
);
alert('2');
FB.ui(
{
method: 'stream.publish',
message: 'Check out this great app! http://apps.facebook.com/{your_app}',
}
);
alert('3');
推荐答案
评论#70由Will Kessler在: http://bugs.developers.facebook.net/show_bug.cgi?id=12849 解决了我的问题,这是一个黑客,但它工作完美:)
Comment #70 by Will Kessler at: http://bugs.developers.facebook.net/show_bug.cgi?id=12849 fixed my problem. It's a hack, but it works perfectly :)
这篇关于FB.ui在FB画布中不起作用。帮帮我!的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!