1

I have installed the Like Box in my blog, and I want to know if the user already like my page. I want to implement something like this to my reader because I want to offer them hidden contents if they already liked my page.

Is there an event where I will detect if the user already liked the page in the Like Box?

1
  • 1
    The accepted answer on this question does not answer the actual question being asked. Sep 15, 2015 at 17:04

2 Answers 2

2

If you are using the XFBML version of the Like Box, you can subscribe to the 'edge.create' event through FB.Event.subscribe.

2

As Kendall points out, the edge.create event only fires if they like the page while you're listening for it.

Here's another approach that parses the $_REQUEST['signed_request'] parameter that Facebook sends to every page tab app. One of the attributes encoded in the signed_request is if the user has liked the page or not.

Pretty slick.

2
  • is there a way to do this on a facebook like box that's on my own webpage, not in a tab on facebook?
    – joon
    Jul 9, 2011 at 11:09
  • We do need an answer to this one... For example for a Local Wifi Hotspot thing. To provide free wifi access if a user has liked a certain page.
    – Devian
    Sep 28, 2014 at 22:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.