I have a own page on my server where people can download a track of my own.
My idea is to put a like button on that page to my Facebook page. People must first hit t
You can check if someone clicks the like button using the Javascript SDK
You can either use the social plugin or the XFBML button, Implementing the XFBML button and the Javascript SDK you can find here: https://developers.facebook.com/docs/reference/javascript/
Then you can create an event listener that listens if an user clicks the like button:
FB.Event.subscribe('edge.create',
function(response) {
alert('You liked the URL: ' + response);
}
);
https://developers.facebook.com/docs/reference/javascript/FB.Event.subscribe/
Using this you can store if someone clicked the like button then save that to either your database or in a session and let the user download their track.
Your code would be something like this