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