/ Published in: JavaScript

Verifica si el usuario es fans de la pagina o no.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<fb:login-button perms="user_likes"> Grant Permissions to Allow access to Likes </fb:login-button> <button onclick="checkDoesLike()">Check si eres fans</button> <h1>Like this Application's Page</h1> <fb:like-box profile-id="ID_APP"></fb:like-box> <script> window.checkDoesLike = function() { FB.api({ method: 'pages.isFan', page_id: 'ID_APP' }, function(resp) { if (resp) { alert('You like the Application.'); } else { alert("You don't like the Application."); } }); }; </script>
Comments
