Class User
- All Implemented Interfaces:
HasCover,HasProfilePicture,Serializable
- Since:
- 1.5
- Author:
- Mark Allen, Patrick Alberts
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classRepresents the Currency Graph API type.static classstatic classRepresents the Payment Pricepoint Graph API type.static classRepresents the Payment Pricepoints Graph API type.static classRepresents the Secure Browsing Graph API type.static classRepresents the Sport Graph API type.static classRepresents the User Device Graph API type.static classRepresents the Video Upload Limits Graph API type.Nested classes/interfaces inherited from class com.restfb.types.FacebookType
FacebookType.Metadata -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanaddDevice(User.UserDevice device) booleanaddFavoriteAthlete(User.Experience athlet) booleanbooleanaddIdsForApps(UserIDForApp userId) booleanaddIdsForBusiness(UserIDForApp userId) booleanaddIdsForPages(UserIDForPage userId) booleanbooleanbooleanbooleanaddLanguage(User.Experience language) booleanaddMeetingFor(String gender) booleanaddSport(User.Sport sportItem) Unspecific age range that this person's age fits into.getBio()The user's biographical snippet.The user's birthday as aString.The user's birthday, typed tojava.util.Dateif possible.Social context for this persongetCover()The person's cover photoThe user's currency preferences.The list of devices the person is using.getEmail()The proxied or contact email address granted by the user.A list of the favorite athletes from the user's profile.A list of the favorite sports teams from the user's profile.The user's first name.The user's gender.Duplicate mapping for "hometown" since FB can return it differently in different situations. -- GETTER -- The user's hometown.The user's hometown name.A profile based app scoped ID.Businesses can claim ownership of multiple apps using Business Manager.Businesses can claim ownership of multiple apps using Business Manager.Businesses can claim ownership of apps and pages using Business Manager.The person's inspirational people.Is the app making the request installed?Install type.A list of friends that can be invited to install a Facebook Canvas appif the current user is a guest user. should always return false.People with large numbers of followers can have the authenticity of their identity manually verified by Facebook.Page labels of this userA list of the languages from the user's profile.The user's last name.getLikes()The user's LikesgetLink()A link to the person's Timeline.The user's locale.he person's current location as entered by them on their profile.What genders the user is interested in meeting.The user's middle name.The person's name formatted to correctly handle Chinese, Japanese, or Korean ordering.The person's payment pricepointsThe user's picture, if provided.The person's PGP public keyThe user's favorite quotes.The time that the shared loginneeds to be upgraded to Business Manager byShortened, locale-aware name for the person.The user's significant other.A list of the sports from the user's profile.Whether the user can add a Donate Button to their Live VideosAn anonymous, but unique identifier for the user.The user's timezone offset.This returns a string which is the same for this person across all the apps managed by the same Business Manager.Date the user's profile was updated.Indicates whether the account has been verified.Video upload limitsprotected voidjsonMappingCompleted(JsonMapper jsonMapper) booleanremoveDevice(User.UserDevice device) booleanremoveFavoriteAthlete(User.Experience athlet) booleanbooleanremoveIdsForApps(UserIDForApp userId) booleanremoveIdsForBusiness(UserIDForApp userId) booleanremoveIdsForPages(UserIDForPage userId) booleanbooleanbooleanremoveLabels(PageLabel label) booleanremoveLanguage(User.Experience language) booleanremoveMeetingFor(String gender) booleanremoveSport(User.Sport sportItem) voidsetAgeRange(User.AgeRange ageRange) Unspecific age range that this person's age fits into.voidThe user's biographical snippet.voidsetBirthday(String birthday) The user's birthday as aString.voidsetContext(FacebookType context) Social context for this personvoidsetCover(CoverPhoto cover) The person's cover photovoidsetCurrency(User.Currency currency) The user's currency preferences.voidThe proxied or contact email address granted by the user.voidsetFirstName(String firstName) The user's first name.voidThe user's gender.voidsetHometown(NamedFacebookType hometown) Duplicate mapping for "hometown" since FB can return it differently in different situations. -- GETTER -- The user's hometown.voidsetIdForAvatars(String idForAvatars) A profile based app scoped ID.voidsetInstalled(Boolean installed) Is the app making the request installed?voidsetInstallType(String installType) Install type.voidsetIsGuestUser(Boolean isGuestUser) if the current user is a guest user. should always return false.voidsetIsVerified(Boolean isVerified) People with large numbers of followers can have the authenticity of their identity manually verified by Facebook.voidsetIsWorkAccount(Boolean isWorkAccount) voidsetLastName(String lastName) The user's last name.voidThe user's LikesvoidA link to the person's Timeline.voidThe user's locale.voidsetLocation(NamedFacebookType location) he person's current location as entered by them on their profile.voidsetMiddleName(String middleName) The user's middle name.voidsetNameFormat(String nameFormat) The person's name formatted to correctly handle Chinese, Japanese, or Korean ordering.voidsetPaymentPricepoints(User.PaymentPricepoints paymentPricepoints) The person's payment pricepointsvoidsetPicture(ProfilePictureSource picture) The user's picture, if provided.voidsetPublicKey(String publicKey) The person's PGP public keyvoidThe user's favorite quotes.voidsetSharedLoginUpgradeRequiredBy(Date sharedLoginUpgradeRequiredBy) The time that the shared loginneeds to be upgraded to Business Manager byvoidsetShortName(String shortName) Shortened, locale-aware name for the person.voidsetSignificantOther(User significantOther) The user's significant other.voidsetSupportsDonateButtonInLiveVideo(Boolean supportsDonateButtonInLiveVideo) Whether the user can add a Donate Button to their Live VideosvoidsetThirdPartyId(String thirdPartyId) An anonymous, but unique identifier for the user.voidsetTimezone(Double timezone) The user's timezone offset.voidsetTokenForBusiness(String tokenForBusiness) This returns a string which is the same for this person across all the apps managed by the same Business Manager.voidsetUpdatedTime(Date updatedTime) Date the user's profile was updated.voidsetVerified(Boolean verified) Indicates whether the account has been verified.voidsetVideoUploadLimits(User.VideoUploadLimits videoUploadLimits) Video upload limitsMethods inherited from class com.restfb.types.NamedFacebookType
getName, setNameMethods inherited from class com.restfb.types.FacebookType
getId, getMetadata, getType, setId, setMetadata, setTypeMethods inherited from class com.restfb.types.AbstractFacebookType
equals, hashCode, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.restfb.types.features.HasProfilePicture
convertPicture
-
Constructor Details
-
User
public User()
-
-
Method Details
-
getBirthdayAsDate
The user's birthday, typed tojava.util.Dateif possible.- Returns:
- The user's birthday, or
nullif unavailable or only available in month/year format.
-
jsonMappingCompleted
-
getHometownName
The user's hometown name.- Returns:
- The user's hometown name.
-
getIdsForApps
Businesses can claim ownership of multiple apps using Business Manager. This method returns the list of IDs that this user has in any of those other apps- Returns:
- list of ids a user has in other apps
-
addIdsForApps
-
removeIdsForApps
-
getIdsForBusiness
Businesses can claim ownership of multiple apps using Business Manager. This edge returns the list of IDs that this user has in any of those other apps- Returns:
- list of ids a user has in other apps
-
addIdsForBusiness
-
removeIdsForBusiness
-
getIdsForPages
Businesses can claim ownership of apps and pages using Business Manager. This edge returns the list of IDs that this user has in any of the pages owned by this business.- Returns:
- list of ids a user has in other pages
-
addIdsForPages
-
removeIdsForPages
-
getMeetingFor
What genders the user is interested in meeting.- Returns:
- What genders the user is interested in meeting.
-
addMeetingFor
-
removeMeetingFor
-
getDevices
The list of devices the person is using. This will return only iOS and Android devices- Returns:
- The list of devices the person is using.
-
addDevice
-
removeDevice
-
getSports
A list of the sports from the user's profile.- Returns:
- A list of the sports from this user's profile.
-
addSport
-
removeSport
-
getFavoriteTeams
A list of the favorite sports teams from the user's profile.- Returns:
- A list of the favorite sports teams from the user's profile.
-
addFavoriteTeam
-
removeFavoriteTeam
-
getFavoriteAthletes
A list of the favorite athletes from the user's profile.- Returns:
- A list of the favorite athletes from the user's profile.
-
addFavoriteAthlete
-
removeFavoriteAthlete
-
getInspirationalPeople
The person's inspirational people.- Returns:
- The person's inspirational people.
-
addInspirationalPeople
-
removeInspirationalPeople
-
getLanguages
A list of the languages from the user's profile.- Returns:
- A list of the languages from the user's profile.
-
addLanguage
-
removeLanguage
-
getLabels
Page labels of this user- Returns:
- labels of this user
-
addLabel
-
removeLabels
-
getInvitableFriends
A list of friends that can be invited to install a Facebook Canvas app- Returns:
- A list of friends that can be invited to install a Facebook Canvas app
-
addInvitableFriend
-
removeInvitableFriend
-
getContext
Social context for this person- Returns:
- Social context for this person
-
setContext
Social context for this person -
getFirstName
The user's first name.- Returns:
- The user's first name.
-
setFirstName
The user's first name. -
getMiddleName
The user's middle name.- Returns:
- The user's middle name.
-
setMiddleName
The user's middle name. -
getNameFormat
The person's name formatted to correctly handle Chinese, Japanese, or Korean ordering.- Returns:
- The person's name formatted to correctly handle Chinese, Japanese, or Korean ordering
-
setNameFormat
The person's name formatted to correctly handle Chinese, Japanese, or Korean ordering. -
getPaymentPricepoints
The person's payment pricepoints- Returns:
- The person's payment pricepoints
-
setPaymentPricepoints
The person's payment pricepoints -
getLastName
The user's last name.- Returns:
- The user's last name.
-
setLastName
The user's last name. -
getShortName
Shortened, locale-aware name for the person.- Returns:
- Shortened, locale-aware name for the person
-
setShortName
Shortened, locale-aware name for the person. -
getCover
The person's cover photo -
setCover
The person's cover photo -
getLink
A link to the person's Timeline. The link will only resolve if the person clicking the link is logged into Facebook and is a friend of the person whose profile is being viewed.- Returns:
- A link to the user's profile.
-
setLink
A link to the person's Timeline. The link will only resolve if the person clicking the link is logged into Facebook and is a friend of the person whose profile is being viewed. -
getBio
The user's biographical snippet.- Returns:
- The user's biographical snippet.
-
setBio
The user's biographical snippet. -
getQuotes
The user's favorite quotes.- Returns:
- The user's favorite quotes.
-
setQuotes
The user's favorite quotes. -
getAgeRange
Unspecific age range that this person's age fits into.- Returns:
- The user's age range
-
setAgeRange
Unspecific age range that this person's age fits into. -
getBirthday
The user's birthday as aString.Will always succeed, even if the user has specified month/year format only. If you'd like to use a typed version of this accessor, call
getBirthdayAsDate()instead. "The person's birthday. This is a fixed format string, like `MM/DD/YYYY`. However, people can control who can see the year they were born separately from the month and day so this string can be only the year (YYYY) or the month + day (MM/DD)",- Returns:
- The user's birthday as a
String.
-
setBirthday
The user's birthday as aString.Will always succeed, even if the user has specified month/year format only. If you'd like to use a typed version of this accessor, call
getBirthdayAsDate()instead. "The person's birthday. This is a fixed format string, like `MM/DD/YYYY`. However, people can control who can see the year they were born separately from the month and day so this string can be only the year (YYYY) or the month + day (MM/DD)", -
getEmail
The proxied or contact email address granted by the user.- Returns:
- The proxied or contact email address granted by the user.
-
setEmail
The proxied or contact email address granted by the user. -
getTimezone
The user's timezone offset.- Returns:
- The user's timezone offset.
-
setTimezone
The user's timezone offset. -
getVerified
Indicates whether the account has been verified. This is distinct from theis_verifiedfield. Someone is considered verified if they take any of the following actions:- Register for mobile
- Confirm their account via SMS
- Enter a valid credit card
- Returns:
- User verification status.
-
setVerified
Indicates whether the account has been verified. This is distinct from theis_verifiedfield. Someone is considered verified if they take any of the following actions:- Register for mobile
- Confirm their account via SMS
- Enter a valid credit card
-
getVideoUploadLimits
Video upload limits- Returns:
- Video upload limits
-
setVideoUploadLimits
Video upload limits -
getGender
The user's gender.- Returns:
- The user's gender.
-
setGender
The user's gender. -
getLocale
The user's locale.- Returns:
- The user's locale.
-
setLocale
The user's locale. -
getPublicKey
The person's PGP public key- Returns:
- The person's PGP public key
-
setPublicKey
The person's PGP public key -
getLikes
The user's Likes- Returns:
- the user's Likes
-
setLikes
The user's Likes -
getPicture
The user's picture, if provided. To force Facebook to fill thepicturefield you have to fetch the user with thefields=pictureparameter, otherwise the picture isnull.- Specified by:
getPicturein interfaceHasProfilePicture- Returns:
- the user's picture as ProfilePictureSource object
- Since:
- 1.6.16
-
setPicture
The user's picture, if provided. To force Facebook to fill thepicturefield you have to fetch the user with thefields=pictureparameter, otherwise the picture isnull.- Since:
- 1.6.16
-
getHometown
Duplicate mapping for "hometown" since FB can return it differently in different situations. -- GETTER -- The user's hometown.Sometimes this can be
null- checkgetHometownName()instead in that case.- Returns:
- The user's hometown.
-
setHometown
Duplicate mapping for "hometown" since FB can return it differently in different situations. -- GETTER -- The user's hometown.Sometimes this can be
null- checkgetHometownName()instead in that case. -
getIdForAvatars
A profile based app scoped ID. It is used to query avatars -
setIdForAvatars
A profile based app scoped ID. It is used to query avatars -
getLocation
he person's current location as entered by them on their profile. This field requires the `user_location` permission.- Returns:
- The user's current location.
-
setLocation
he person's current location as entered by them on their profile. This field requires the `user_location` permission. -
getSignificantOther
The user's significant other.- Returns:
- The user's significant other.
-
setSignificantOther
The user's significant other. -
getSupportsDonateButtonInLiveVideo
Whether the user can add a Donate Button to their Live Videos -
setSupportsDonateButtonInLiveVideo
Whether the user can add a Donate Button to their Live Videos -
getUpdatedTime
Date the user's profile was updated.- Returns:
- Date the user's profile was updated.
-
setUpdatedTime
Date the user's profile was updated. -
getThirdPartyId
An anonymous, but unique identifier for the user.- Returns:
- An anonymous, but unique identifier for the user.
-
setThirdPartyId
An anonymous, but unique identifier for the user. -
getCurrency
The user's currency preferences.Further documentation available on Facebook's Displaying prices in user's currency page.
- Returns:
- The user's currency preferences.
- Since:
- 1.6.12
-
setCurrency
The user's currency preferences.Further documentation available on Facebook's Displaying prices in user's currency page.
- Since:
- 1.6.12
-
getTokenForBusiness
This returns a string which is the same for this person across all the apps managed by the same Business Manager.- Returns:
- string which is the same for a person across all apps managed by one company
- Since:
- 1.7.0
-
setTokenForBusiness
This returns a string which is the same for this person across all the apps managed by the same Business Manager.- Since:
- 1.7.0
-
getInstallType
Install type.- Returns:
- Install type.
-
setInstallType
Install type. -
getInstalled
Is the app making the request installed?- Returns:
- Is the app making the request installed?
-
setInstalled
Is the app making the request installed? -
getIsVerified
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 theverifiedfield- Returns:
- Is the user verified
-
setIsVerified
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 theverifiedfield -
getIsWorkAccount
-
setIsWorkAccount
-
getIsGuestUser
if the current user is a guest user. should always return false. -
setIsGuestUser
if the current user is a guest user. should always return false.
-