Use the Facebook SDK. There is a JS or a PHP version you can use.
You'll need to signup as a developer (if you haven't already) at http://developers.facebook.com and add your website as an app to get the relevant keys to access the SDK.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.