Answers for "Check if user liked page | Javascript | Facebook"

0

Check if user liked page | Javascript | Facebook

<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  
        }
    })
Posted by: Guest on October-03-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language