Asset 20 8 2
Does AI recommend your business? Run the free check →

Join 15,000 business owners, marketers and entrepreneurs. The Sunday newsletter you'll be annoyed only arrives once a week.

Article

Facebook Graph API Explained: Nodes, Tokens, Versions and Rate Limits

The Facebook Graph API, also called the Meta Graph API, is the main way apps get data into and out of Facebook. It's an HTTP-based API that lets an app query data, publish posts, manage ads and upload photos, and every request needs an access token and, ideally, a version number such as v26.0, the latest version Meta lists.

If you're a marketer rather than a developer, you'll mostly meet the Graph API through the tools you connect to Facebook. If you're building something yourself, here's the structure, the free testing tool and the limits worth knowing before you write a line of code.

How the Graph API is structured

Meta named it after the social graph, its picture of the information on Facebook. That graph is made of three things:

PartMeaningExample
NodeA single objectA User, a Page or a photo
EdgeA collection of objects connected to a nodeThe photos on a Page
FieldData about an objectA Page's name

Meta's docs call nodes and edges endpoints. Because the API runs over HTTPS, it works with any language that has an HTTP library, and some requests even work straight in a browser. Every request goes to graph.facebook.com.

Access tokens: the key to every request

An access token proves who's asking and what they're allowed to see. Meta's docs describe two lifetimes:

Token typeTypical lifetime
Short-livedAbout one to two hours
Long-livedAbout 60 days
Marketing API with Standard accessLong-lived tokens that don't expire based on time, though they can still be invalidated

Tokens from web login are short-lived, and you can swap them for long-lived ones with a server-side call that uses your app secret. Apps built with Meta's iOS and Android SDKs get long-lived tokens by default. Meta also warns not to depend on these lifetimes, because they can change without warning or expire early, so your code should handle an expired token.

Using the Graph API Explorer

The Graph API Explorer is Meta's tool for testing queries before you build them into an app. Here's how to run your first one:

  1. Open the Graph API Explorer from Meta for Developers and choose your app from the Meta App dropdown. It lists apps where you're an admin, developer or tester.
  2. Get a User access token. It shows in the upper right of the tool.
  3. Run the default query, which asks for the id and name fields on the /me node.
  4. Check the response window. You'll see your app-scoped User ID and name.
  5. Add fields from the field viewer on the left, then click Get Code for sample code to start from.

Two buttons save time when something breaks. Copy Debug Information copies your query and response for a support request, and Save Session saves your query with the access token removed so you can share it safely.

One catch with permissions: while your app is in development you can grant it any permission for people with a role on the app. Once it's live, a permission that hasn't been approved through App Review makes your query fail.

Versions and why you should always set one

Each Graph API version is guaranteed to work for at least two years. A version stops being usable two years after the next version is released, and calls to an expired version fall back to the next oldest usable one. Developers who've steered an app through a forced version upgrade have plenty to teach in a developer tutorial for this blog.

If you leave the version out of a call, Meta treats it as unversioned and uses whatever version is set in your app dashboard under Settings, then Advanced. Meta recommends always specifying the version. The Marketing API has its own version numbers and schedule, separate from the Graph API.

Rate limits in plain English

Calls made with an app access token count against your app's limit, worked out over a rolling one-hour window as 200 calls multiplied by your number of users. It's an app-wide pool, not a per-person cap, so one busy user can make more than 200 calls as long as the app total stays under the maximum. Calls with a user access token count against that user's own allowance instead.

Work with me

Want AI doing the heavy lifting in your marketing?

I build the systems that handle the boring 80 percent, so you get your week back. Done properly, with the human kept in.

Busy endpoints return an X-App-Usage header showing how close you are to the limit, covering call count, total time and total CPU time. Check it and slow down before you hit the ceiling. The ads APIs have their own, different formulas based on active ads.

For ad accounts, campaigns and reporting, our guide to the Marketing API explains the separate access tiers and versions.

Where marketers meet the Graph API

If APIs are new to you, this plain-English guide to APIs in business messaging is a gentler place to start.

My verdict

The Graph API is well documented and the Explorer makes it easy to test before you commit. The three things to build around are all in Meta's own docs: tokens that expire, versions that retire after two years and app permissions that never went through App Review. Build for all three from day one and your connection will keep working long after launch.

You need an app before you can call anything, and our guide to registering a developer account walks through the steps on Meta for Developers.

Frequently asked questions

What is the Facebook Graph API?

It's the primary way to get data into and out of the Facebook platform, an HTTP-based API apps use to query data, post stories, manage ads and upload photos.

What is the latest Graph API version?

Meta's versioning page lists v26.0 as the latest Graph API version, and each version works for at least two years.

How long does a Facebook access token last?

Meta says short-lived tokens typically last about one to two hours and long-lived tokens about 60 days, but warns not to depend on those lifetimes.

What is the Graph API Explorer?

It's Meta's tool for testing Graph API queries with your app's access token, viewing the response and generating sample code.

What is the Graph API rate limit?

For app access tokens, Meta calculates calls within one hour as 200 multiplied by the number of users, across the whole app rather than per user.

Published and maintained by the Lilach Bullock team, covering marketing, AI and business growth.
Your buyers are asking AI who to use. Does it say you?

See for free whether ChatGPT, Claude, Perplexity, Gemini and Google name you, and get the plan to become the answer.

Check my AI visibility →
Sundays only

Get the Sunday newsletter.

One email a week. AI experiments, marketing tactics, and the workflows Lilach is building right now in her own business.

Subscribe free

Let’s get your marketing running on AI.

Book a free 30-minute call

We figure out what you need, where AI fits in, and what working together would look like.

Book the call →

Or take the 30-second calculator

You’ll see the hours and the money quietly leaking out of your week, and the three workflows worth building first.

Take the calculator →

Or grab the free AI resource library

Prompt packs, templates, checklists, and swipe files. The exact tools I build for paying clients. Yours, free.

Get the library →
Keep reading

More from the blog.