Graph:Checkin

From Facebook Developer Wiki (FbDevWiki.com)
Jump to: navigation, search

You can search, read and publish checkins. Every checkin is associated with a checkin ID that represents an object in the graph. These checkins are then associated with locations represented by Facebook Pages or Open Graph protocol pages.

To get a user's checkins, request the user_checkins extended permission. To see the user's friends' checkins, request the friends_checkins extended permission.

You can GET individual check-ins by passing the checkin ID:

GET https://graph.facebook.com/[checkin_id]

Or you can GET checkin information from individual places or users:

GET https://graph.facebook.com/[user id]/checkins
GET https://graph.facebook.com/[page id]/checkins

You can search for recent checkins for an authorized user and his or her friends:

GET https://graph.facebook.com/search?type=checkin&access_token=ACCESS_TOKEN

You can search for places near a specific location (distance is in meters):

GET https://graph.facebook.com/search?q=pizza&type=place&center=lat,long&distance=1000

Contents

Properties

Name Description Permissions Returns Condition
id The checkin ID user_checkins JSON string
from The ID and name of the user who made the checkin user_checkins A JSON object containing the name and Facebook id of the user who made the checkin
tags The users the author tagged in the checkin user_checkins Contains in data a list of the users tagged in this checkin
place Information about the Facebook Page that represents the location of the checkin user_checkins A JSON object containing the Page id, name, and location
message The message the user added to the checkin user_checkins JSON string
application Information about the application that made the checkin user_checkins A JSON object that contains the name and id of the application
created_time The time the checkin was created user_checkins A JSON string containing a IETF RFC 3339 datetime

Connections

Name Description Permissions Returns
likes The likes made on this checkin Publicly available JSON object containing data and paging. The data portion contains an array of objects containing id and name fields.
comments The comments made on this checkin Publicly available JSON object containing data and paging. The data portion contains an array of Comment objects.

Publishing

Requires the publish_checkins permission.

To publish a checkin, POST the user coordinates and the Place ID and optionally add attachments like link, picture etc. similar to Post to the checkins of the user, i.e., http://graph.facebook.com/PROFILE_ID/checkins.

curl -F 'access_token=...' \
     -F 'message=The coffee is just meh.' \
     -F 'place=PAGE_ID' \
     -F 'coordinates={"latitude":"...", "longitude": "..."}' \
     -F 'tags=USER_ID1, USER_ID2' \
     https://graph.facebook.com/me/checkins

Notes

Examples and explanations for iOS SDK

Personal tools
Namespaces
Variants
Actions
Navigation
Graph API
FQL
Toolbox