0

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.

Community
  • 1
  • 1
Musa Muaz
  • 714
  • 2
  • 11
  • 29

1 Answers1

2

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.

CBroe
  • 91,630
  • 14
  • 92
  • 150