Facebook Developers
DocsToolsSupportNewsApps
Log In
  • Social Plugins
  • Facebook Login
  • Open Graph
  • Facebook APIs
    • Graph API
    • FQL
    • Open Graph
    • Dialogs
    • Chat
    • Internationalization
    • Ads
  • Games
  • Media
  • Payments
  • App Center
  • Promote Your App
  • iOS
  • Android
  • Web
  • Technology Partners
  • Objects
    • Achievement(Instance)
    • Album
    • App and Game Groups
    • Application
    • Checkin
    • Comment
    • Data Access - Login, Privacy and Permissions
    • 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

Selecting Results

Facebook APIs › Graph API › Selecting Results

Selecting results is not the same as searching. For more on searching through the Graph API, please see our document on searching.

By default, most object properties are returned when you make a query. You can choose the fields (or connections) you want returned with the "fields" query parameter. For example, this URL will only return the id, name, and picture of Ben: https://graph.facebook.com/bgolub?fields=id,name,picture

You can also request multiple objects in a single query using the "ids" query parameter. For example, the URL https://graph.facebook.com?ids=arjun,vernal returns both profiles in the same response. For another way to do something similar, please see our document on field expansion.

The "ids" query parameter also accepts URLs. This is useful for finding IDs of URLs in the Open Graph. For example: https://graph.facebook.com/?ids=http://www.imdb.com/title/tt0117500/. This call must be signed with an app access token.

Additionally, there is a special identifier me which refers to the current user. So the URL https://graph.facebook.com/me returns the active user's profile.

When retrieving Posts via the /home, /feed, or /posts connection, you can restrict the results to only those with a location attached by adding with=location to the URL parameters:

https://graph.facebook.com/me/home?with=location

Updated about a month ago
Facebook © 2013 · English (US)
AboutAdvertisingCareersPlatform PoliciesPrivacy Policy