How is it possible to redirect the user to another page when he likes a page tab?
I followed this tutorial :
http://developers.facebook.com/docs/appsonfacebook/pagetabs/
All is working perfectly but i need to display another page if he likes the page tab.
Same problem if he unlikes the page. The previous page should reappear….
this is the code i found but not working…
<?php
require 'php-sdk/src/facebook.php';
?>
<!doctype html>
<html xmlns:fb="http://www.facebook.com/2008/fbml">
<head>
</head>
<body>
you don't like yet
</body>
<script>
FB.api(pageId + '/likes', 'post' ,function(response) {
location.href = 'youlike.php';
});
</script>
</html>
I hope i’m clear enough.
If you want to test yourself : http://www.facebook.com/Luthe131
the page tab is test app
thank you in advance
I see you are using php sdk, Lets do it by php, you dont need to use FB.api() to check your own page is liked or not.here is how to do it,
Now if the user liked the page, $liked will be 1,
now,
oh, and facebook refreshes the app when like button is triggered. so, value of $liked will change accordingly.