Detect if current visitor has already "liked" a webpage


I have a question regarding “liking” a web page outside of facebook.

I am familiar with placing a like button on an external web page – I’ve done this for clients many times. However, I have a new client who wants a “Like” button, but also wants to know if the current visitor as already “liked” the page so he can display more content on his website. For example, for normal visitors, his web page displays 3 helpful hints. But if the user has “liked” the page, then the web page displays 10 more hints.

Is it possible (through php or javascript or something) to do a check every time the page is accessed, determine if the current visitor has “liked” the page, and then present the content accordingly??

Thanks in advance for any help!


No…unless you ask Facebook or what ever this “liked” button is for…assuming Facebook would even tell you.

If you bring Facebook connect into the mix to authenticate visitors you can retrieve, and parse, a list of the pages they have liked. By comparing these to the ID of the page in question you can figure out if there’s an existing connection. click on “likes”

For this, you could have admin permission from fb which u can not get, rest u can see on insights of your page.

Hi all. Thanks for your replies. Pretty much what I thought.

Although I have noticed that if I like a page and then come back later to that particular site, the like box says “liked” (if I am already logged into facebook). Is there a way the rest of the page can use this info and not just the Facebook widget??

You don’t need admin rights to know what a user likes, you need their rights.

See the link I posted previously and click the likes section to see everything you liked – as any app that’s authenticated to you can do.