Saturday, August 27, 2011

Know Your Facebook Profile ID


If you want to know your Facebook Profile ID to find Fan Pages, setup Facebook Comment Box, Like Box then you probably need to know your Facebook ID. So, in order to know your Facebook ID we can use Facebook Graph API.

Paste the following URL to your address bar:
https://graph.facebook.com/your_user_name

Replace your_user_name with your Facebook Username.

For example: My username is Liverpool.Rocks so to access my graph I need to type in

https://graph.facebook.com/Liverpool.Rocks

If you don't have setup a Username you don't need to worry. Simply, login to your Facebook and in a new tab type in:

https://graph.facebook.com/your_name

For example: https://graph.facebook.com/SaugatAcharya

The output obtained is JSON format as below:

{
    "id": "1143197729",
    "name": "Saugat Acharya",
    "first_name": "Saugat",
    "last_name": "Acharya",
    "link": "http://www.facebook.com/saugat.acharya",
    "username": "saugat.acharya",
    "gender": "male",
    "locale": "en_US"
}
Good Luck!