-
-
Save wytanj/a56cc3cf5b1a089a996bc8e08fb40891 to your computer and use it in GitHub Desktop.
Facebook JS-SDK: Check if the user has liked a page
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FB.api({ method: 'pages.isFan', page_id: '{PAGE_ID}' }, function(response) { | |
| if (response) { | |
| alert("user has liked the page"); | |
| } else { | |
| alert("user has not liked the page"); | |
| } | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment