可能重复:
Facebook how to check if user has liked page and show content?
我有代码:
FB.api({ method: 'pages.isFan', page_id: 'XXX',}, function(resp) {
if (resp == true) {
alert('user_id likes the Application.');
} else if(resp.error_code) {
alert(resp.error_msg);
} else {
alert("user_id doesn't like the Application.");
}
});
我想查看他们已登录facebook的当前访问者是否喜欢指定的粉丝页面(page_id)。