You can periodically check if the user likes this page:
FB.api ( "/me/likes/[page id]", function( response ) { if ( response.data ) { if( response.data.name ) { alert( "We've got a fan!" ); } else { alert( "Not a fan!" ); } } else { alert( "Something went worng..." ); } } );
In addition, if you need to move the user to another tab / application, you will need to refresh the entire page to use:
top.location.href = "[new url]";
source share