Facebook recently updated their Graph API to require an oAuth access token. Here is a quick guide that explains the easiest way to create an access token for your site.
Create a Facebook App
First you need to create a facebook app that you own / control. To do this go to this url: https://www.facebook.com/developers/ and click "Set Up New App". Enter a name for the app and agree to the terms. It doesn't matter what you name the app. Once that is done go to the Web Site tab on the left and enter the URL for your site in the Site URL box. This is required or you will get an invalid referral error when you try to generate your token.
Once you have your app created copy and paste the "Application ID" we will need this later.
Generating the token
Now we need to build the URL to create our access token. There are 3 important parts to this process.
client_id – This is your Application Id you copied earlier
redirect_uri – this should be the URL to your site
scope – this is what you want the access code to allow access to. If you don't specify "offline_access" the access code will expire when you log out of facebook.
Now you just have to replace the "####" with your application id and "itslennysfault.com" with your website's url and paste it in to your browser's URL bar. You will then be taken to the typical facebook allow permissions page. Once you click "Allow" you will be redirected to your web site with some extra data.
The URL when you are redirected back should look like this:
Where the ##### is is your access token… copy and paste that and you're good to go. You can use this access code to Get latest status from facebook fan pages in PHP.