APIs are behind most web and mobile applications. They help us integrate systems together, access data that we need, communicate with different web services, and a lot more. APIs are widely used in the software development world, so they’re a great skill to have on your resume.
Today, we’ll discuss the benefits of APIs and how having API experience can help you leverage yourself as a candidate during your interview process. Then, we’ll provide an overview of the popular Facebook Graph API. Let’s get started!
We’ll cover:
Get API experience for free
Get hands-on with Facebook Graph API using Educative’s 1-week free trial.
Before we discuss benefits, let’s briefly define APIs.
An Application Programming Interface, or API, is an intermediary that facilitates communication between an application and a web server. When we initiate a request, it’s called an API call. This API call tells the application what we want it to do, and then the application will use an API to ask the webserver to do something.
To communicate with the webserver, APIs often make use of use of a format called JSON. APIs consist of a set of instructions for creating and integrating app software. They allow us to integrate new application components into existing application architectures, and at the same time, ensure a high level of security and control.
There are many different types of APIs. The main types include:
Public: These APIs have zero restrictions because they’re available to the public.
Private: These APIs are typically used internally within a company.
Partner: These APIs require us to have specific licenses or rights in order to access them. They fall in the middle of public and private APIs.
There are different ways to build APIs. Two common ways include REST and SOAP.
Let’s take a look at four relevant ways that APIs are used in our everyday lives:
Streaming services
Our favorite streaming services such as Netflix and Spotify use APIs to help distribute their content.
Web applications
Apps use APIs to connect their front ends with their back ends.
Weather data
You know those weekly forecasts that you see when you search for the weather? This is done with an API. When you Google “Seattle weather”, you’ll see a forecast like this:
Google uses an API that sends them weather information that they reformat to display to us on our screens.
Pay with PayPal
Have you ever seen the “Pay with PayPal” option when making an online payment?
This functionality is built with APIs. When you select the “Pay with PayPal” option, the application sends a request to the PayPal API with transaction details and relevant user data. Then, you would provide authentication and confirm your purchase. Finally, the API will send confirmation of payment back to the application you purchased from.
Now it’s time to discuss the benefits of APIs!
APIs allow us to achieve our business goals efficiently. They ensure that we have seamless communication between our different applications. Let’s take a look at some of the top benefits of using APIs:
Automation: APIs allow us to automate tasks, which helps save time, money, and effort.
Productivity: APIs increase our productivity because they allow us to implement existing functionalities instead of creating new solutions from scratch.
Connectivity: APIs improve connectivity because they allow different applications and platforms to connect, share data, and perform different tasks.
User experience: APIs enhance user experience because they enable us to create effective, personalized ways to interact with our users.
Integration: APIs allow content to easily be embedded.
Customization: With APIs, we can customize content and services for our users.
Ease of distribution: An API makes it easy to distribute our software, which results in more sales and uses. For example, PayPal is widely used through its API.
Get API experience for free with our 1-week Educative Unlimited Trial. Educative’s text-based courses are easy to skim and feature live coding environments, making learning quick and efficient.
Think of API experience as a valuable tool to have in your toolbox. In today’s digital age, there’s a lot of focus on web services and web applications. APIs are an integral piece to the current software environment. Many online actions are done cross-platform, meaning that they use a lot of different services to perform a single task. These different services are accessed through APIs, so if you’re looking at a position with a company that uses APIs extensively, having API experience will set you apart.
Let’s think of Facebook, for example. Facebook has its own APIs that enable Facebook developers to do a large variety of tasks, such as performing ad management, managing Facebook pages, integrating with WhatsApp, and much more. They use APIs to execute many different tasks across their platform. If you wanted to apply for a job at Facebook, having experience working with APIs would be a great thing to showcase on your resume and in your interviews.
Before we get started, let’s define Graph APIs.
Graph APIs allow us to efficiently query large amounts of data. A Graph API models data with:
Nodes: individual objects, like an image, comment, user, or page
Edges: connections between single objects and a collection of objects, like multiple comments on a Facebook photo on someone’s Facebook page
Fields: data about different objects, like name or date of birth
Graph APIs allow us to interact with multiple nodes in a single request. Graph API requests typically require an access token. Access tokens are credentials that applications can use to access an API.
Now, let’s take a look at the Facebook Graph API.
According to the official Facebook documentation on developers.facebook.com
, the Facebook Graph API “is the primary way to get data into and out of the Facebook platform.” All of the Facebook SDKs and products interact with this API somehow. This API enables us to:
Programmatically query data
Post new stories
Manage ads
Upload photos
And much more
Facebook named their Graph API after the idea of a “social graph,” which they define as a representation of the information on Facebook. This information includes user’s posts, pages, groups, photos, friends, etc. The API is HTTP-based and uses the nodes, edges, and fields we outlined earlier. Let’s look at how they work within this API:
Nodes: how we get data about individual objects
Edges: how we get collections of objects connected to nodes
Fields: how we specify which data we want to be included in responses
The Facebook Graph API is extremely large, so it breaks different chunks of data into separate APIs. Most of these APIs are available to us through the same host URL: graph.facebook.com
.
There are many ways to access the API because Facebook has created a set of official SDKs. These include iOS, Android, JavaScript, PHP, React, Swift, and more.
Note: SDKs, or Software Development Kits, are collections of software development tools combined into a single installable package.
APIs are a widely used software tool that sends information back and forth between web applications and users. They’re a crucial part of the software development world because our applications and web services can’t do much without them. There are many different APIs out there, which means there’s a lot to learn. Having API experience can help you with your job search because it’ll show potential employers that you have what it takes to work with their products and services.
We covered the basics of the Facebook Graph API, but there’s still so much more to learn. You can move on to more advanced topics such as:
Short-lived and long-lived access tokens
Setting up the Facebook App with Facebook Login
Pagination and other Graph API endpoints
To get started learning these concepts and more, check out Educative’s course Facebook Login and the Facebook Graph API. In this curated course, you’ll cover the basic concepts of Graph APIs and then build your own project by deploying the Facebook Login page. By the end, you’ll have a deeper understanding of how to build API integrations in your own projects. This course will provide you with a great project to put on your resume or in your portfolio! To improve your tech interview skills, Educative has curated some amazing paths and courses, so don’t forget to check them out!
Happy learning!
Free Resources