In this article, which is going to be the Part-1 of the four part series, I am going to give you the in-depth analysis and overview of Facebook Graph API using Facebook Graph API Explorer. In the article “For Developers: Facebook's Graph API”, I have talked about what an API is, and what nodes, edges, fields, and few operations are. If you haven’t read that article, I would highly recommend you to read that article first. If you have read that, it is the time to have a look at the Graph API in depth. So without further ado, let us get started!
- Enables you to use the Like Button and other Social Plugins on your site.
- Enables you to use Facebook Login to lower the barrier for people to sign up on your site.
- Makes it easy to call into Facebook's Graph API.
- Launch Dialogs that let people perform various actions like sharing stories.
- Facilitates communication when you're building a game or an app tab on Facebook.
Note(according to the official document): The SDK, social plugins and dialogs work on both desktop and mobile web browsers.
Testing Facebook API using Facebook Explorer
Go to the following link:
And Log-in to your Facebook Account (as shown below):
Once you log into Facebook, you will see the following page:
As you can see I have labeled few of the fields with numbers 1, 2, and 3. Let’s discuss them one-by-one:
- Here you can see the query language. As you see the “me” has two fields “id, name.” You can use as many fields that Facebook API provides, but you will have to give user the permission to use this feature. In the Part-2 I shall talk about what permissions are and their list.
- As you can see I am using the Graph API Explorer for Facebook. Using this drop-down you can select your own Application to check the functionalities of your queries, but that’s not in the scope of this article.
Alright if you hit the “submit” button in (2), you would see:
The id and the name of your profile via which you have logged in, would be displayed upon hitting the submit button. I have blurred out my fields for privacy issues, but you would get yours if you execute the API.
In this article, I have introduced the Facebook Graph API Explorer, and I have also mentioned how you can run queries using this explorer. I have also given you the idea about the Facebook API SDKs, and which SDK I am going to use in my future parts. In the next part, I am going to talk about permissions in the Facebook API. That’s it for this article.