I'm developing a facebook app which has the following "structure":
Browser window (facebook.com/page/xxxx)
-- My app's iframe
-- Like button's iframe
I'm using a Like button within my app so that's an iframe inside an iframe, when the users clicks on the like button I'd like to show the content so the page currently looks somethin like this:
if ( is_fan() ) {
//show content
} else {
//show like button plus other text
}
The actual logic to check if the user is already a fan is working as intended, the problem is that when I click the like button I need the whole page to reload in order to show the "fan content", if I do this:
FB.Event.subscribe('edge.create', function(href, widget) {
top.location.reload();
});
The page seems to reload but everything stays the same, but if I click "Like" and the click the refresh button in my browser everything shows up just fine.
Can anyone help me figure this out?
Thanks in advance!
We reference the facebook parent page as top
.
use top.location.href="";
or top.location.reload();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With