User
User
A user represents a person on Facebook. The /{user-id}
node returns a single user.
Reading
Returns a single user node
Examples
GET /v2.2/{user-id} HTTP/1.1
Host: graph.facebook.com
/* PHP SDK v5.0.0 */
/* make the API call */
$request = new FacebookRequest(
$session,
'GET',
'/{user-id}'
);
$response = $request->execute();
$graphObject = $response->getGraphObject();
/* handle the result */
/* make the API call */
FB.api(
"/{user-id}",
function (response) {
if (response && !response.error) {
/* handle the result */
}
}
);
// For more complex open graph stories, use `FBSDKShareAPI`
// with `FBSDKShareOpenGraphContent`
/* make the API call */
FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc]
initWithGraphPath:@"/{user-id}"
parameters:params
HTTPMethod:@"GET"];
[request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection,
id result,
NSError *error) {
// Handle the result
}];
/* make the API call */
new GraphRequest(
AccessToken.getCurrentAccessToken(),
"/{user-id}",
null,
HttpMethod.GET,
new GraphRequest.Callback() {
public void onCompleted(GraphResponse response) {
/* handle the result */
}
}
).executeAsync();
Fields
Field | Description |
---|---|
numeric string | The id of this person's user account. This ID is unique to each app and cannot be used across different apps. Our upgrade guide provides more information about app-specific IDs |
string | The About Me section of this person's profile |
| The person's address |
| The age segment for this person expressed as a minimum and maximum age. For example, more than 18, less than 21. |
string | The person's bio |
string | The person's birthday. This is a fixed format string, like |
| Social context for this person |
| The person's local currency information |
| The list of devices the person is using. This will return only iOS and Android devices |
| The person's education |
string | The person's primary email address listed on their profile. This field will not be returned if no valid email address is available |
| Athletes the person likes |
| Sports teams the person likes |
string | The person's first name |
string | The gender selected by this person, |
| The person's hometown |
| The person's inspirational people |
enum | Install type |
bool | Is the app making the request installed? |
list<string> | Genders the person is interested in |
bool | Is this a shared login (e.g. a gray user) |
bool | People with large numbers of followers can have the authenticity of their identity manually verified by Facebook. This field indicates whether the person's profile is verified in this way. This is distinct from the |
| Facebook Pages representing the languages this person knows |
string | The person's last name |
string | A link to the person's Timeline |
| The person's current location as entered by them on their profile. This field is not related to check-ins |
string | The person's locale |
list<string> | What the person is interested in meeting for |
string | The person's middle name |
string | The person's full name |
string | The person's name formatted to correctly handle Chinese, Japanese, or Korean ordering |
| The person's payment pricepoints |
unsigned int32 | Platform test group |
string | The person's political views |
string | The person's relationship status |
string | The person's religion |
| Security settings |
| The person's significant other |
| Sports this person likes |
string | The person's favorite quotes |
string | A string containing an anonymous, but unique identifier for the person. You can use this identifier with third parties |
float (min: -24) (max: 24) | The person's current timezone offset from UTC |
string | A token that is the same across a business's apps. Access to this token requires that the person be logged into your app. This token will change if the business owning the app changes |
datetime | Updated time |
datetime | The time that the shared loginneeds to be upgraded to Business Manager by |
bool | Indicates whether the account has been verified. This is distinct from the
|
| Video upload limits |
bool | Can the viewer send a gift to this person? |
string | The person's website |
| Details of a person`s work experience |
string | The person's PGP public key |
| The person's cover photo |
Edges
Edge | Description |
---|---|
Facebook Pages this person administers/is an admin for | |
Achievements made in Facebook games | |
The activities listed on the person's profile | |
The advertising accounts to which this person has access | |
Reference document for using Facebook Marketing APIs to manage your ad account group | |
The person's ad contracts | |
Insights data for the person's Audience Network apps | |
The photo albums this person has created | |
This person's pending requests from an app | |
App requests | |
The books listed on this person's profile | |
The domains the user admins | |
Events for this person. By default this does not include events the person has declined or not replied to | |
The person's custom friend lists | |
Business entities can claim ownership of multiple apps using the Business Manager. This edge returns the list of IDs that this user has in any of those other apps | |
A list of friends that can be invited to install a Facebook Canvas app | |
Games this person likes | |
The Facebook Groups that the person belongs to | |
The interests listed on the person's profile under Likes > Interests | |
All the Pages this person has liked | |
This is similar to the | |
Movies this person likes | |
Music this person likes | |
Objects | |
The permissions that the person has granted this app | |
Photos the person is tagged in or has uploaded | |
The person's profile picture | |
List of tagged places for this person. It can include tags on videos, posts, statuses or links | |
This is similar to the | |
Friends that can be tagged in content published via the Graph API | |
TV shows this person likes | |
Videos the person is tagged in or uploaded | |
Video broadcasts from this person | |
The Facebook apps that this person is a developer of. | |
The checkins this person has made. | |
This person's family relationships. | |
The feed of posts (including status updates) and links published by this person. | |
A person's pending friend requests. | |
A person's friends. | |
A person's Facebook homepage feed. | |
A person's Facebook Messages inbox. | |
A feed of posts and photos that include location information and in which this person has been tagged. This is useful for constructing a chronology of places that the person has visited. | |
The list of mutual friends between two people. | |
The unread Facebook notifications that a person has. | |
A person's Facebook Messages outbox. | |
The questions that a person has created. | |
The scores this person has received from Facebook Games that they've played. | |
The profiles that are following this person. | |
The profile that this person is following. |
Creating
You can't perform this operation on this endpoint.
You may perform a POST request to the following edges from this node:Updating
/{user_id}
.Parameters
Name | Description |
---|---|
id int | The ID of this person's account Required |
password string | Used for test accounts only. Password for this account |
name string | Used for test accounts only. Name for this account |
firstname string | This person's first name |
lastname string | This person's last name |
label_cohort Object | This person's label cohort |
Return Type
success
: bool, /{user_id}
.Parameters
Name | Description |
---|---|
id int | The ID of this person's account Required |
password string | Used for test accounts only. Password for this account |
name string | Used for test accounts only. Name for this account |
firstname string | This person's first name |
lastname string | This person's last name |
label_cohort Object | This person's label cohort |
Return Type
success
: bool, /{custom_audience_id}
/users
.Parameters
Name | Description |
---|---|
id numeric string | Custom Audience ID |
session Object | [UNDOCUMENTED] Please write a sensible, developer-friendly description of what this field/param does |
payload Object | Fields: schema, data,app_ids. e.g. payload = { "schema":"EMAIL_SHA256", "data":["HASH", "HASH", "HASH" ]} or payload = { "schema":"UID", "data":[123, 456, 789], "app_ids":[1111, 2222]} |
Return Type
audience_id
: numeric string, session_id
: numeric string, num_received
: int32, num_invalid_entries
: int32, invalid_entry_samples
: Map {Deleting
Delete a test user
/{page_id}
/blocked
.Parameters
Name | Description |
---|---|
id int | Page ID Required |
uid int | Deprecated. Same as |
user int | List of User or Page IDs to unblock. This or |
Return Type
success
: bool, /{user_id}
.Parameters
Name | Description |
---|---|
id int | Test User ID Required |
Return Type
success
: bool,