check if user liked page 7c javascript 7c facebook

Solutions on MaxInterview for check if user liked page 7c javascript 7c facebook by the best coders in the world

showing results for - "check if user liked page 7c javascript 7c facebook"
Madonna
13 Aug 2016
1<script src="http://connect.facebook.net/en_US/all.js"></script> 
2<script>
3  FB.init({
4    appId  : 'APPID',
5    status : true, // check login status
6    cookie : true, // enable cookies to allow the server to access the session
7  });
8 
9FB.api({ method: 'fql.query', query: 'SELECT uid FROM page_fan WHERE uid=UID AND page_id=PAGEID' },
10    function(result) {
11        if (result.length){ 
12           //is fan
13        } 
14 
15        else { 
16           //is not fan  
17        }
18    })