Want to implement the OpenGraph example Facebook-app

Hi everyone :slight_smile:

For implementing OpenGraph I read this tuturial (http://developers.facebook.com/docs/opengraph/getting-started/) and followed the instructions to create the example app. It worked, as indeed an message was published on my timeline that was only visible to me.

I would like to take that app further and implement it in my website. If I understood the tutorial and code of the app correctly, the code should be implemented on every page on my site, right? Or how can I adapt that example app so that when a visitor likes a page on my website, a message as the one in the tutorial is posted on Facebook?