Like / Recommend Button - FB.Event.Subscribe

Hi there all,

I’m developing a “Recommend” button for a website I am working on. I am using the Facebook Social Plugin that can be found Here ->

You will notice under the FAQ heading “How do I know when a user clicks a Like button?” it states that I can subscribe to the ‘edge.create’ event through FB.Event.subscribe. This links to an additional info page located here ->

On this second info page, it says :

For example, suppose you want to record Likes in your database whenever a button is clicked:

    function(response) {
        alert('You liked the URL: ' + response);

My questions are:

  1. Where do I put this code?
  2. Is this PHP/Javascript/HTML or what?
  3. What do I need to add to tell it where I want to record the “Likes”?

Has anyone ever done this before? If so, I’d be very grateful for some insight - These instruction pages from Facebook are great but they tend to rely on people already knowing quite a lot about FB Development and I’m quite new to this scene.

Thanks in advance.