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
  • 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
    • offsite_conversion_event
    • 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

user

API Reference › FQL › user

Description

A user profile as represented in FQL. If you need user information for analytic purposes, query the standard_user_info table instead.

Columns

NameDescription

about_me

string

More information about the user being queried

activities

string

The user's activities

affiliations

array

The networks to which the user being queried belongs. The status field within this field will only return results in English

age_range

struct

The user's age range. May be 13-17, 18-20 or 21+.

min

unsigned int32

The lower bound of the age range (inclusive).

max

unsigned int32

The upper bound of the age range (inclusive).Isn't set in case of 21+

allowed_restrictions

string

A comma-delimited list of demographic restriction types a user is allowed to access. Currently, alcohol is the only type that can get returned

birthday

string

The user's birthday. The format of this date varies based on the user's locale

birthday_date

string

The user's birthday in MM/DD/YYYY format

books

string

The user's favorite books

can_message

bool

Whether the user can send a message to another user

can_post

bool

Whether or not the viewer can post to the user's Wall

contact_email

string

A string containing the user's primary Facebook email address. If the user shared his or her primary email address with you, this address also appears in the email field (see below). Facebook recommends you query the email field to get the email address shared with your application

currency

struct

The user's default currency

user_currency

string

the ISO-4217-3 code for the user's preferred currency (defaulting to USD if the user hasn't set one)

currency_exchange

float

the number of Facebook Credits that equate in value to one unit of user_currency

currency_exchange_inverse

float

the number of units of user_currency that equate in value to one Credit

usd_exchange

float

USD value of one unit of user_currency

usd_exchange_inverse

float

value in USD that is equal to one unit in user_currency

currency_offset

unsigned int32

the number by which a price should be divided for display in user_currency units

current_address

struct

The current address of the user

street

string

Street of the location

city

string

City of the location

state

string

State of the location

country

string

Country of the location

zip

string

Zip code of the location

latitude

float

Latitude of the location

longitude

float

Longitude of the location

id

id

ID of the location

name

string

Name of the location

located_in

id

ID of the parent location of this location

current_location

struct

The user's current location

street

string

Street of the location

city

string

City of the location

state

string

State of the location

country

string

Country of the location

zip

string

Zip code of the location

latitude

float

Latitude of the location

longitude

float

Longitude of the location

id

id

ID of the location

name

string

Name of the location

located_in

id

ID of the parent location of this location

devices

array

An array of objects containing fields os, which may be a value of 'iOS' or 'Android', along with an additional field hardware which may be a value of 'iPad' or 'iPhone', if present. However, hardware may not be returned if we are unable to determine the exact hardware model and only the os

education

array

A list of the user's education history. Contains year and type fields, and school object (name, id, type, and optional year, degree, concentration array, classes array, and with array )

email

string

A string containing the user's primary Facebook email address or the user's proxied email address, whichever address the user granted your application. Facebook recommends you query this field to get the email address shared with your application

email_hashes

array

An array containing a set of confirmed email hashes for the user. The format of each email hash is the crc32 and md5 hashes of the email address combined with an underscore (_)

first_name

string

The user's first name

friend_count

number

Count of all the user's friends

friend_request_count

number

The user's number of outstanding friend requests

has_timeline

bool

Whether the user has a timeline or linkable profile

hometown_location

struct

The user's hometown (and state)

street

string

Street of the location

city

string

City of the location

state

string

State of the location

country

string

Country of the location

zip

string

Zip code of the location

latitude

float

Latitude of the location

longitude

float

Longitude of the location

id

id

ID of the location

name

string

Name of the location

located_in

id

ID of the parent location of this location

inspirational_people

array

The people who inspire the user

install_type

string

App install type of the user

interests

string

The user's interests

is_app_user

bool

Indicates whether the user being queried has logged in to the current application

is_blocked

bool

Whether the user is blocked by the current session user

languages

array

The user's languages

last_name

string

The user's last name

likes_count

number

Count of all the pages this user has liked

locale

string

The two-letter language code and the two-letter country code representing the user's locale. Country codes are taken from the ISO 3166 alpha 2 code

meeting_for

array

A list of the reasons the user being queried wants to meet someone

meeting_sex

array

A list of the genders the person the user being queried wants to meet

middle_name

string

The user's middle name

movies

string

The user's favorite movies

music

string

The user's favorite music

mutual_friend_count

number

The number of mutual friends shared by the user being queried and the session user

name

string

The user's full name

name_format

string

The user's name formatted to correctly handle Chinese, Japanese, Korean ordering

notes_count

(number) or (bool)

The number of notes created by the user being queried

online_presence

string

The user's Facebook Chat status. Returns a string, one of active, idle, offline, or error (when Facebook can't determine presence information on the server side). The query does not return the user's Facebook Chat status when that information is restricted for privacy reasons

payment_instruments

array

The user's (hashed) payment instruments

payment_pricepoints

array

The user's payment price points

pic

string

The URL to the medium-sized profile picture for the user being queried. The image can have a maximum width of 100px and a maximum height of 300px. This URL may be blank

pic_big

string

The URL to the largest-sized profile picture for the user being queried. The image can have a maximum width of 200px and a maximum height of 600px. This URL may be blank

pic_big_with_logo

string

The URL to the largest-sized profile picture for the user being queried. The image can have a maximum width of 200px and a maximum height of 600px, and is overlaid with the Facebook favicon. This URL may be blank

pic_cover

struct

An array containing the keys cover_id, source, and offset_y which refer to the user's cover photo

cover_id

id

The ID of the cover photo

source

string

The source of the cover photo

offset_y

float

When non-zero, cover image overflows vertically. Value indicates the offset percentage of the total image height from top [0-100]

offset_x

float

When non-zero, cover image overflows horizontally. Value indicates the offset percentage of the total image width from left [0-100]

pic_small

string

The URL to the small-sized profile picture for the user being queried. The image can have a maximum width of 50px and a maximum height of 150px. This URL may be blank

pic_small_with_logo

string

The URL to the small-sized profile picture for the user being queried. The image can have a maximum width of 50px and a maximum height of 150px, and is overlaid with the Facebook favicon. This URL may be blank

pic_square

string

The URL to the square profile picture for the user being queried. The image can have a maximum width and height of 50px. This URL may be blank

pic_square_with_logo

string

The URL to the square profile picture for the user being queried. The image can have a maximum width and height of 50px, and is overlaid with the Facebook favicon. This URL may be blank

pic_with_logo

string

The URL to the medium-sized profile picture for the user being queried. The image can have a maximum width of 100px and a maximum height of 300px, and is overlaid with the Facebook favicon. This URL may be blank

political

string

The user's political views

profile_blurb

string

This string contains the contents of the text box under a user's profile picture

profile_update_time

number

The time the profile was most recently updated (UNIX timestamp). If the user's profile has not been updated in the past three days, this value will be 0

profile_url

string

The URL to a user's profile

proxied_email

string

The proxied wrapper for a user's email address. If the user shared a proxied email address instead of his or her primary email address with you, this address also appears in the email field (see above). Facebook recommends you query the email field to get the email address shared with your application

quotes

string

The user's favorite quotes

relationship_status

string

The type of relationship for the user being queried

religion

string

The user's religion

search_tokens

array

The search tokens for the user

security_settings

struct

Security settings of the user

secure_browsing

struct

User's secure browsing settings

enabled

bool

True if secure browsing is enabled

sex

string

The user's gender

shipping_information

array

The user's shipping information

significant_other_id

number

The user ID of the partner (for example, husband, wife, boyfriend, girlfriend)

sort_first_name

string

The user's first name, if the user has a Japanese name

sort_last_name

string

The user's last name, if the user has a Japanese name

sports

array

The sports that the user plays. The array objects contain id and name fields

status

struct

The user's current status

message

string

Message of the status

time

timestamp

Time of when the status was posted (UNIX timestamp)

status_id

id

ID of the status

source

string

URL of the status

uid

id

User's ID

comment_count

unsigned int32

Number of comments on the status

subscriber_count

number

The user's total number of subscribers

third_party_id

string

A string containing an anonymous, but unique identifier for the user. You can use this identifier with third-parties

timezone

number

The user's timezone offset from UTC

tv

string

The user's favorite television shows

uid

number

The user ID

username

string

The user's username

verified

bool

Indicates whether or not Facebook has verified the user

video_upload_limits

struct

The size of the video file and the length of the video that a user can upload. This object contains length and size of video

length

unsigned int32

Length limit of the video

size

unsigned int32

Size limit of the video

viewer_can_send_gift

bool

Whether the viewer can send gift to this user

wall_count

number

The number of Wall posts for the user being queried

website

string

The website

work

array

A list of the user's work history. Contains employer, location, position, start_date and end_date fields

education_history

array

Deprecated. This value is now equivalent to education entry of type "College"

family

array

For family information, you should query the family FQL table instead

favorite_athletes

array

The user's favorite athletes; this field is deprecated and will be removed in the near future. The array objects contain id and name fields

favorite_teams

array

The user's favorite teams; this field is deprecated and will be removed in the near future. The array objects contain id and name fields

games

string

The user's favorite games; this field is deprecated and will be removed in the near future. The string is a comma-separated list

has_added_app

bool

Deprecated. This value is now equivalent to is_app_user

hs_info

struct

Deprecated. This value is now equivalent to education entry of type "High School"

hs1_name

string

Name of the first high school

hs2_name

string

Name of the second high school

grad_year

unsigned int32

User's graduation year from high school

hs1_id

id

ID of the first high school

hs2_id

id

ID of the second high school

work_history

array

Deprecated. This value is now equivalent to work

Examples

  • SELECT ... FROM user WHERE uid = A
  • SELECT ... FROM user WHERE username = A
  • SELECT ... FROM user WHERE third_party_id = A
Note: Additional filters on other columns can be specified but they may make the query less efficient.

Permissions

To read the user table you need

  • no access_token for publicly available data: uid, name, first_name, middle_name, last_name, sex, locale, pic_small_with_logo, pic_big_with_logo, pic_square_with_logo, pic_with_logo, username
  • any valid access_token for additional user data, except for the follow-on exceptions:
  • user_likes or friends_likes permissions to view: movies, music, books, tv, languages, quotes, games, sports, favorite_athletes, favorite_teams, inspirational_people, likes_count
  • user_education_history or friends_education_history permissions to view: hs_info, education_history, education
  • user_work_history or friends_work_history permissions to view: work_history, work
  • user_religion_politics or friends_religion_politics permissions to view: political, religion
  • user_about_me or friends_about_me permissions to view: about_me
  • user_notes or friends_notes permissions to view: notes_count
  • user_status or friends_status permissions to view: status
  • user_online_presence or friends_online_presence permissions to view: online_presence
  • email permissions to view: proxied_email, contact_email
  • user_birthday or friends_birthday permissions to view: birthday, birthday_date
  • user_hometown or friends_hometown permissions to view: hometown_location
  • user_relationships or friends_relationships permissions to view: family, significant_other_id
  • user_relationship_details or friends_relationship_details permissions to view: meeting_sex, meeting_for
  • user_activities or friends_activities permissions to view: activities
  • user_interests or friends_interests permissions to view: interests
  • user_location or friends_location permissions to view: current_location
  • user_website or friends_website permissions to view: website
Facebook © 2013 · English (US)
AboutAdvertisingCareersPlatform PoliciesPrivacy Policy