Reputation: 714
I run a Wordpress website. I have many users who have content of their own.
I want to add this feature: if one user wants to see another user's content, then the user (who wants to see) has to Like the other user's Facebook page.
Is there any plugin to do this?
I am currently using this code by Patrik from Stack Overflow:
FB.api({
method: "pages.isFan",
page_id: page_id,
}, function(response) {
console.log(response);
if(response){
alert('You Likey');
} else {
alert('You not Likey :(');
}
}
);
But I actually need to also integrate user_id
.
Note: I can get user id from get_the_user_id()
function; I only need to integrate it.
Upvotes: 0
Views: 126
Reputation: 96407
Like-Gating is not allowed any more by Facebook – and therefor they have removed all easy means to check whether the user likes a certain page.
You must present the same content to all users, whether they liked a specific page or not.
Upvotes: 2