开发者

FB.ui does not work inside FB canvas. HELP!

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.

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');


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 :)

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜