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
  • Tables
    • album
    • app_role
    • application
    • apprequest
    • checkin
    • comment
    • comments_info
    • connection
    • cookies
    • column
    • developer
    • domain
    • domain_admin
    • event
    • event_member
    • family
    • friend
    • friendlist
    • friendlist_member
    • friend_request
    • group
    • group_member
    • insights
    • like
    • link
    • link_image_src
    • link_stat
    • location_post
    • mailbox_folder
    • message
    • note
    • notification
    • object_url
    • page
    • page_admin
    • page_blocked_user
    • page_global_brand_child
    • page_fan
    • page_milestone
    • permissions
    • permissions_info
    • photo
    • photo_src
    • photo_tag
    • place
    • privacy
    • privacy_setting
    • profile
    • profile_tab
    • profile_view
    • question
    • question_option
    • question_option_votes
    • review
    • score
    • standard_friend_info
    • standard_user_info
    • status
    • stream
    • stream_filter
    • stream_tag
    • subscription
    • table
    • thread
    • translation
    • unified_message
    • unified_message_count
    • unified_message_sync
    • unified_thread
    • unified_thread_action
    • unified_thread_count
    • unified_thread_sync
    • url_like
    • user
    • video
    • video_tag

location_post

API Reference › FQL › location_post

Description

An FQL table that returns Posts that have locations associated with them and that satisfy at least one of the following conditions:

  • you were tagged in the Post

  • a friend was tagged in the Post

  • you authored the Post

  • a friend authored the Post

The User object in the Graph API has a corresponding /locations connection. In addition, by including with=location in the URL parameters, the /home, /feed, and/post connections on the User object can be filtered to just those posts containing a location.

Columns

NameDescription

app_id

id

ID of the application that published the post

author_uid

id

ID of person publishing the post

coords

struct

Coordinates of the checkin location

latitude

float (min: -90) (max: 90)

A float, in decimal degrees, describing the latitude. Minumum is -90.0, maximum is 90.0.

longitude

float (min: -180) (max: 180)

A float, in decimal, describing the longitude. Minumum is -180.0, maximum is 180.0.

altitude

float

A float, in meters, describing the altitude.

accuracy

float

A float, in meters, describing the accuracy.

altitudeAccuracy

float

A float describing the accuracy of the altitude.

heading

float

A double or null, in degrees, describing the heading direction calculated based on previous position.

speed

float

A double or null, in meters/second, describing the speed calculated based on previous position.

timestamp

timestamp

A UNIX timestamp for the time of the request

id

id

ID of the object associated with this location

latitude

float

Latitude of the checkin location

longitude

float

Longitude of the checkin location

message

string

Message of the post story

page_id

id

ID of the Facebook page associated with the location or event in the post

page_type

string

Type of the target. For example, page and event

post_id

string

ID of the post story

tagged_uids

array

IDs of users tagged in the checkin

timestamp

timestamp

UNIX timestamp of the checkin

type

string

The type of post. Either photo, checkin, video, or status

Examples

  • SELECT ... FROM location_post WHERE checkin_id = A
  • SELECT ... FROM location_post WHERE id = A
  • SELECT ... FROM location_post WHERE target_id = A
  • SELECT ... FROM location_post WHERE page_id = A
  • SELECT ... FROM location_post WHERE latitude = A AND longitude = B AND distance_meters = C
  • SELECT ... FROM location_post WHERE author_uid = A
  • SELECT ... FROM location_post WHERE tagged_uids = A
  • SELECT ... FROM location_post WHERE post_id = A
Note: Additional filters on other columns can be specified but they may make the query less efficient.

Permissions

To read Posts with location information, you need:

  • user_photos or friends_photos for Photos
  • user_status or friends_status for Posts (not including Photos)
  • user_checkins or friends_checkins for Checkins only (excluding all other types of Posts)

Requesting the user_status or friends_status permissions will return information about Checkins as well as other types of objects.

Facebook © 2013 · English (US)
AboutAdvertisingCareersPlatform PoliciesPrivacy Policy