Facebook Developers
DocumentationSupportBlogAppsLog In
  • Getting Started
  • Core Concepts
  • Advanced Topics
    • Dialogs
    • FQL
    • Internationalization
    • Ads API
    • Credits
    • Chat API
    • Legacy REST API
    • Legacy FBML
    • Legacy FBJS
    • Legacy Javascript SDK
  • SDK Reference
  • Tools
  • Tables
    • album
    • application
    • apprequest
    • checkin
    • comment
    • comments_info
    • connection
    • cookies
    • developer
    • domain
    • domain_admin
    • event
    • event_member
    • family
    • friend
    • friend_request
    • friendlist
    • friendlist_member
    • group
    • group_member
    • insights
    • like
    • link
    • link_stat
    • location_post
    • mailbox_folder
    • message
    • note
    • notification
    • object_url
    • offer
    • page
    • page_admin
    • page_blocked_user
    • page_fan
    • page_milestone
    • permissions
    • permissions_info
    • photo
    • photo_src
    • photo_tag
    • place
    • privacy
    • privacy_setting
    • profile
    • profile_view
    • question
    • question_option
    • question_option_votes
    • review
    • standard_friend_info
    • standard_user_info
    • status
    • stream
    • stream_filter
    • stream_tag
    • subscription
    • thread
    • translation
    • unified_message
    • unified_thread
    • unified_thread_action
    • unified_thread_count
    • url_like
    • user
    • video
    • video_tag

user

Advanced Topics › FQL › user

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

The Graph API User has the equivalent information for the user profile information.

Notes:

  • You can cache this data and subscribe to real time updates on any of its fields which are also fields in the corresponding Graph API version.
  • No data will be returned by this table if the user has turned off access to Facebook Platform.
  • If a user has allowed an application to view certain restricted data then this data will be available the viewer using the same application with any valid access_token. Note that site privacy settings take precedence. So if the viewer cannot see this data on the site then they will not be able to see this via FQL.
  • A friend can control the information accessible to applications you use through privacy settings on the website. So for example, if ''Religious and political views'' are set to not be accessible to apps friends use, then even asking for friends_religion_politics permission and querying the friend's uid for political data will not return a result.

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

Columns

IndexableNameTypeDescription
*uidint

The user ID of the user being queried.

*usernamestring

The username of the user being queried.

first_namestring

The first name of the user being queried.

middle_namestring

The middle name of the user being queried.

last_namestring

The last name of the user being queried.

*namestring

The full name of the user being queried.

pic_smallstring

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_bigstring

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_squarestring

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.

picstring

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.

affiliationsarray

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

profile_update_timetime

The time the profile of the user being queried was most recently updated. If the user's profile has not been updated in the past three days, this value will be 0.

timezoneint

The user's timezone offset from UTC.

religionstring

The religion of the user being queried.

birthdaystring

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

birthday_datestring

The birthday of the user being queried in MM/DD/YYYY format.

sexstring

The gender of the user being queried.

hometown_locationarray

The hometown (and state) of the user being queried.

meeting_sexarray

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

meeting_forarray

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

relationship_statusstring

The type of relationship for the user being queried.

significant_other_iduid

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

politicalstring

The political views of the user being queried.

current_locationarray

The current location of the user being queried.

activitiesstring

The activities of the user being queried.

interestsstring

The interests of the user being queried.

is_app_userbool

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

musicstring

The favorite music of the user being queried.

tvstring

The favorite television shows of the user being queried.

moviesstring

The favorite movies of the user being queried.

booksstring

The favorite books of the user being queried.

quotesstring

The favorite quotes of the user being queried.

about_mestring

More information about the user being queried.

hs_infoarray

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

education_historyarray

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

work_historyarray

Deprecated. This value is now equivalent to work.

notes_countint

The number of notes created by the user being queried.

wall_countint

The number of Wall posts for the user being queried.

statusstring

The current status of the user being queried.

has_added_appbool

Deprecated. This value is now equivalent to is_app_user.

online_presencestring

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.

localestring

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 list.

proxied_emailstring

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.

profile_urlstring

The URL to a user's profile. If the user specified a username for his or her profile, profile_url contains the username.

email_hashesarray

An array containing a set of confirmed email hashes for the user. Emails are registered via the deprecated connect.registerUsers API call and are only confirmed when the user adds your application. The format of each email hash is the crc32 and md5 hashes of the email address combined with an underscore (_).

pic_small_with_logostring

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_big_with_logostring

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_square_with_logostring

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_logostring

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.

allowed_restrictionsstring

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

verifiedbool

Indicates whether or not Facebook has verified the user.

profile_blurbstring

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

familyarray

Note: For family information, you should query the family FQL table instead.

This array contains a series of entries for the immediate relatives of the user being queried. Each entry is also an array containing the following fields:

  • relationship -- A string describing the type of relationship. Can be one of parent, mother, father, sibling, sister, brother, child, son, daughter.
  • uid (optional) -- The user ID of the relative, which gets displayed if the account is linked to (confirmed by) another account. If the relative did not confirm the relationship, the name appears instead.
  • name (optional) -- The name of the relative, which could be text the user entered. If the relative confirmed the relationship, the uid appears instead.
  • birthday -- If the relative is a child, this is the birthday the user entered.

Note: At this time, you cannot query for a specific relationship (like SELECT family FROM user WHERE family.relationship = 'daughter' AND uid = '$x'); you'll have to query on the family field and filter the results yourself.

websitestring

The website of the user being queried.

is_blockedbool

Returns true if the user is blocked to the viewer/logged in user.

contact_emailstring

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.

emailstring

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.

*third_party_idstring

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

name_formatstring

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

video_upload_limitsarray

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.

gamesstring

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

workarray

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

educationarray

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 ).

sportsarray

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

favorite_athletesarray

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_teamsarray

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.

inspirational_peoplearray

The people who inspire the user. The array objects contain id and name fields.

languagesarray

The user's languages. The array objects contain id and name fields.

likes_countint

Count of all the pages this user has liked.

friend_countint

Count of all the user's friends.

mutual_friend_countint

The number of mutual friends shared by the user in the query and the session user.

can_postbool

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

See Also

  • Users Graph API

  • standard_user_info FQL table

Updated about 3 months ago
Facebook © 2012 · English (US)
AboutCareersPlatform PoliciesPrivacy Policy