Check if logged in user has liked my Facebook Page

前端 未结 2 1612
情歌与酒
情歌与酒 2020-12-13 05:20

OK. So I have no idea on how to do this but you are going to have to talk like a 3 year old to me. I know PHP, HTML, CSS and a tiny smidge of javascript. I want to be able t

2条回答
  •  情深已故
    2020-12-13 05:52

    You can use this code because it's so simple :

    FB.api({
        method:     "pages.isFan",
        page_id:        page_id,
    },  function(response) {
            console.log(response);
            if(response){
                alert('You Likey');
            } else {
                alert('You not Likey :(');
            }
        }
    );
    

    this ll user user_likes permission

    Hope this will help you

提交回复
热议问题