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
    • App and Game Groups
    • 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

Examples

Facebook APIs › Graph API › Examples

Basic Objects

  • Users: https://graph.facebook.com/btaylor (Bret Taylor)
  • Pages: https://graph.facebook.com/cocacola (Coca-Cola page)
  • Events: https://graph.facebook.com/251906384206 (Facebook Developer Garage Austin)
  • Groups: https://graph.facebook.com/195466193802264 (Facebook Developers group)
  • Applications: https://graph.facebook.com/2439131959 (the Graffiti app)
  • Status messages: https://graph.facebook.com/367501354973 (A status message from Bret)
  • Photos: https://graph.facebook.com/98423808305 (A photo from the Coca-Cola page)
  • Photo albums: https://graph.facebook.com/99394368305 (Coca-Cola's wall photos)
  • Profile pictures: http://graph.facebook.com/0/picture (your profile picture)
  • Videos: https://graph.facebook.com/817129783203 (A Facebook tech talk on Graph API)
  • Notes: https://graph.facebook.com/122788341354 (Note announcing Facebook for iPhone 3.0)
  • Checkins: https://graph.facebook.com/414866888308 (Check-in at Facebook HQ.)

Connections

  • Friends: https://graph.facebook.com/me/friends?access_token=...
  • News feed (this is an outdated view, does not reflect the News Feed on facebook.com): https://graph.facebook.com/me/home?access_token=...
  • Profile feed (Wall): https://graph.facebook.com/me/feed?access_token=...
  • Likes: https://graph.facebook.com/me/likes?access_token=...
  • Movies: https://graph.facebook.com/me/movies?access_token=...
  • Music: https://graph.facebook.com/me/music?access_token=...
  • Books: https://graph.facebook.com/me/books?access_token=...
  • Notes: https://graph.facebook.com/me/notes?access_token=...
  • Permissions: https://graph.facebook.com/me/permissions?access_token=...
  • Photo Tags: https://graph.facebook.com/me/photos?access_token=...
  • Photo Albums: https://graph.facebook.com/me/albums?access_token=...
  • Video Tags: https://graph.facebook.com/me/videos?access_token=...
  • Video Uploads: https://graph.facebook.com/me/videos/uploaded?access_token=...
  • Events: https://graph.facebook.com/me/events?access_token=...
  • Groups: https://graph.facebook.com/me/groups?access_token=...
  • Checkins: https://graph.facebook.com/me/checkins?access_token=...
  • Objects with Location: https://graph.facebook.com/me/locations?access_token=...

We support different connection types for different objects. For example, you can get the list of all the people attending the Facebook Developer Garage at SXSW (ID #331218348435) by fetching https://graph.facebook.com/331218348435/attending?access_token=....

Search

  • All public posts: https://graph.facebook.com/search?q=watermelon&type=post
    This search type does not support limit/offset paging.
  • People: https://graph.facebook.com/search?q=mark&type=user
  • Pages: https://graph.facebook.com/search?q=platform&type=page (requires access_token)
  • Events: https://graph.facebook.com/search?q=conference&type=event
  • Applications: https://graph.facebook.com/search?q=endomondo&type=application
  • Groups: https://graph.facebook.com/search?q=programming&type=group
  • Places: https://graph.facebook.com/search?q=coffee&type=place.
    You can narrow your search to a specific location and distance by adding the center parameter (with latitude and longitude) and an optional distance parameter:
    https://graph.facebook.com/search?q=coffee&type=place&center=37.76,-122.427&distance=1000
  • Checkins: https://graph.facebook.com/search?type=checkin (This request returns you or your friend's latest checkins, or checkins where you or your friends have been tagged; currently, it does not accept a q= parameter.)
  • Objects with location. The following will return information about objects that have location information attached. In addition, the returned objects will be those in which you or your friend have been tagged, or those objects that were created by you or your friends. There are important behavioral differences in the results depending on the permissions your app has acquired. Please see the documentation for the location_post FQL table for more information.
    • To search for objects near a geographical location, use type=location and add the center and distance parameters: https://graph.facebook.com/search?type=location&center=37.76,-122.427&distance=1000
    • To search for objects at a particular place, use type=location and specify the ID of the place. For example for Posts at Facebook HQ, use: https://graph.facebook.com/search?type=location&place=166793820034304
Updated about 5 months ago
Facebook © 2013 · English (US)
AboutAdvertisingCareersPlatform PoliciesPrivacy Policy