Return to Snippet

Revision: 46862
at May 26, 2011 23:04 by erikportin


Initial Code
<script src="http://connect.facebook.net/en_US/all.js"></script> 
<script>
  FB.init({
    appId  : 'APPID',
    status : true, // check login status
    cookie : true, // enable cookies to allow the server to access the session
  });
	
FB.api({ method: 'fql.query', query: 'SELECT uid FROM page_fan WHERE uid=UID AND page_id=PAGEID' },
    function(result) {
        if (result.length){ 
           //is fan
        } 

        else { 
           //is not fan  
        }
    })

Initial URL

                                

Initial Description

                                

Initial Title
Check if user liked page | Javascript | Facebook

Initial Tags
javascript

Initial Language
JavaScript