Facebook Developers
DocsToolsSupportNewsApps
Log In
  • Social Plugins
  • Facebook Login
  • Open Graph
  • Facebook APIs
    • Graph API
    • FQL
    • Open Graph
    • Dialogs
    • Chat
    • Internationalization
    • Ads
  • Games
  • Payments
  • App Center
  • Promote Your App
  • iOS
  • Android
  • JavaScript
  • PHP
  • More SDKs
  • Objects
    • Achievement(Instance)
    • Album
    • Application
    • Checkin
    • Comment
    • Domain
    • Errors
    • Event
    • Field Expansion
    • FriendList
    • Group
    • Insights
    • Link
    • Message
    • Note
    • Offer
    • Order
    • Page
    • Pagination
    • Payment
    • Photo
    • Pictures
    • Post
    • Privacy Parameter
    • Publishing
    • Question
    • QuestionOption
    • Realtime Updates
    • Review
    • Search
    • Selecting Results
    • Status message
    • Thread
    • User
    • Video

Graph API

Facebook APIs › Graph API

Getting Started

If you're new to the Graph API you should start with the Graph API Getting Started Guide.

The Graph API is the primary way that data is retrieved or posted to Facebook. The Getting Started Guide contains an overview of the basics of the API, walks you through using the Graph API Explorer, shows you how names work, how permissions work, what connections are and puts it all together so the rest of this reference make sense.


Reading Data

Pictures
Pictures are available on many objects and are the most commonly used object in the graph. This document covers how to access them. Pictures are not Photographs. For Photographs that people upload please see our Photo and Album reference API documents.
Selecting Results
When accessing objects in the graph, you can control which fields are returned.
Pagination
Many of the Graph APIs let you get data in small sets, with a way to page forward and backwards in time. This document covers how to use the pagination arguments and results.
Search
You can search through public objects with the Graph API. This document covers the basics on the objects you can search and how to page through results.
Dates
Many APIs return dates. This document covers the default format we use at Facebook and how you can change it.
Data Access - Login, Privacy and Permissions
Much of the data you'll be accessing via the Graph API requires the user to allow you to access it. This includes reading anything beyond public data or writing data to a user's timeline. This document gives you pointers to what you need to do about the topics of privacy, permissions, login and auth tokens.

Publishing

Publishing with the Graph API
People, pages, groups and applications all have a way to post stories to their respective timelines. This short article gives the basics of how to create simple posts. This article also covers how to generate likes and create comments.
Deleting
You can delete objects out of the graph. This article shows you how to delete objects, but also how to remove likes.

Performance

Realtime Updates
It's possible to get updates on objects you care about without having to poll Facebook on a regular basis. Facebook will push updates to you when they change. At scale, this can have a significant performance improvement for your app.
Batch Requests
It's possible to batch a bunch of requests together and make them all at once, instead of having to make a bunch of small requests. This can improve latency and overhead associated with making a large number of changes.
Field Expansion
This feature allows you to get a number of objects with a single query result. Much like batch requests for results, field expansion can reduce latency and improve the performance of your app.

Apps and Pages

App Analytics
We offer an API for app authors who want to programatically get analytics for their app.
Pages
There are a set of APIs to manage Pages. This lets you build apps that you can use to manage posts, gather analytics, post pictures or many other things.

Games

App and Games Groups
Games on Facebook can create Facebook groups to give game players the chance to coordinate and socialize.

Other

Errors
The list of errors that Graph API calls can generate.
Introspection
Many objects allow you to determine the attributes and connections they support at runtime. This can be useful for debugging.
Locale
You can retrieve localized content from the Graph API by adding the locale parameter.
Examples
Some examples for accessing the Graph API.
Request Parameters
There are parameters that you can pass with Graph API requests that modify input and output types.

    Objects

    Achievement(Instance)

    Instance for an achievement for a user.

    Album

    A photo album

    Application

    An application registered on Facebook Platform

    Checkin

    A checkin made through Facebook Places or the Graph API.

    Comment

    A Comment on a Graph API object

    Domain

    A website domain within the Graph API

    Errors

    Errors using the Graph API

    Event

    A Facebook event

    Field Expansion

    Graph API Field Expansion

    FriendList

    A Facebook friend list

    Group

    A Facebook group

    Insights

    Statistics about applications, pages, or domain.

    Link

    A shared link

    Message

    A message in a thread

    Note

    A Facebook Note

    Offer

    An Offer published by a page.

    Order

    An order object associated with Facebook Credits.

    Page

    A Facebook Page

    Pagination

    Paging through Graph API results

    Payment

    A payment made through our Payments API.

    Photo

    An individual photo within an album

    Pictures

    Using pictures with the Graph API

    Post

    An individual entry in a profile's feed

    Privacy Parameter

    Privacy Parameter for Graph API, REST API and Open Graph Actions.

    Publishing

    Publishing with the Graph API

    Question

    A question asked by a user, as represented in the Graph API.

    QuestionOption

    An option allowed as an answer to a question.

    Realtime Updates

    The Graph API supports realtime updates to enable your app using Facebook to subscribe to changes in data from Facebook. Your app caches data and receives updates, rather than polling Facebook’s servers. Caching data and using this API can improve the reliability of your app and decrease its load times.

    Review

    A review for an application

    Search

    Searching with the Graph API.

    Selecting Results

    Selecting results with the Graph API.

    Status message

    A status message on a user's wall

    Thread

    A message thread

    User

    A user profile.

    Video

    An individual video

    Updated about 2 months ago
    Facebook © 2013 · English (US)
    AboutAdvertisingCareersPlatform PoliciesPrivacy Policy