Facebook Graph API - Project

| 0 comments | facebook

I have managed to crack the OAuth thing that Facebook has taken up to authenticate web apps calling their new Graph API. I found it quite simple actually.

Before you can make restricted requests, you need to be first issued with an auth_token. To get one you need to send a request to:

LIST_OF_OBJECTS is where you comma delimit the list of things you will want to access (ie events,photos,email etc). The call returns a code which you then use along with your secret to retrieve the auth_token

The auth_token is then returned along with an expiry countdown in seconds. This can then be added to any API calls for which you need permission.

I have used just one PHP script to do everything. It just checks if its receiving instructions by the user to make a call as a GET variable else goes along through the authentication procedure until an auth_token is set

Feel free to test it out over at


Be the first to comment!

Add a comment