Created
June 4, 2012 10:45
-
-
Save timonweb/2867715 to your computer and use it in GitHub Desktop.
Check if user is a fan of a facebook 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("me/likes/SOME_ID", function(response) { | |
| if ( response.data.length === 1 ) { //there should only be a single value inside "data" | |
| console.log('You like it'); | |
| } else { | |
| console.log("You don't like it"); | |
| } | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment