Class User

    • Constructor Detail

      • User

        public User()
    • Method Detail

      • getBirthdayAsDate

        public Date getBirthdayAsDate()
        The user's birthday, typed to java.util.Date if possible.
        Returns:
        The user's birthday, or null if unavailable or only available in month/year format.
      • getHometownName

        public String getHometownName()
        The user's hometown name.
        Returns:
        The user's hometown name.
      • getIdsForApps

        public List<UserIDForAppgetIdsForApps()
        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
      • getIdsForBusiness

        public List<UserIDForAppgetIdsForBusiness()
        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
      • getIdsForPages

        public List<UserIDForPagegetIdsForPages()
        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
      • getInterestedIn

        @Deprecated
        public List<StringgetInterestedIn()
        Deprecated.
        since breaking change on 4 April, 2018
        The genders the user is interested in.
        Returns:
        The genders the user is interested in.
      • addInterestedIn

        @Deprecated
        public boolean addInterestedIn​(String gender)
        Deprecated.
        since breaking change on 4 April, 2018
        Add a gender the user is interested in.
        Parameters:
        gender - the gender that should be added
        Returns:
        true if the gender could be added
      • removeInterestedIn

        @Deprecated
        public boolean removeInterestedIn​(String gender)
        Deprecated.
        since breaking change on 4 April, 2018
        Remove a gender the user is interested in.
        Parameters:
        gender - the gender that should be removed
        Returns:
        true if the gender could be removed
      • getMeetingFor

        public List<StringgetMeetingFor()
        What genders the user is interested in meeting.
        Returns:
        What genders the user is interested in meeting.
      • getWork

        @Deprecated
        public List<WorkExperiencegetWork()
        Deprecated.
        since breaking change on 4 April, 2018
        A list of the work history from the user's profile.
        Returns:
        A list of the work history from the user's profile.
      • addWork

        @Deprecated
        public boolean addWork​(WorkExperience workHistoryItem)
        Deprecated.
        since breaking change on 4 April, 2018
        Adds the WorkExperience from the work experience list
        Parameters:
        workHistoryItem - the WorkExperience that should be added
        Returns:
        true if the WorkExperience could be added
      • removeWork

        @Deprecated
        public boolean removeWork​(WorkExperience workHistoryItem)
        Deprecated.
        since breaking change on 4 April, 2018
        Removes the WorkExperience from the work experience list
        Parameters:
        workHistoryItem - the WorkExperience that should be removed
        Returns:
        true if the WorkExperience could be removed
      • getDevices

        public List<User.UserDevicegetDevices()
        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.
      • getEducation

        @Deprecated
        public List<User.EducationgetEducation()
        Deprecated.
        since breaking change on 4 April, 2018
        A list of the education history from the user's profile.
        Returns:
        A list of the education history from the user's profile.
      • getSports

        public List<User.SportgetSports()
        A list of the sports from the user's profile.
        Returns:
        A list of the sports from this user's profile.
      • getFavoriteTeams

        public List<User.ExperiencegetFavoriteTeams()
        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.
      • getFavoriteAthletes

        public List<User.ExperiencegetFavoriteAthletes()
        A list of the favorite athletes from the user's profile.
        Returns:
        A list of the favorite athletes from the user's profile.
      • getLanguages

        public List<User.ExperiencegetLanguages()
        A list of the languages from the user's profile.
        Returns:
        A list of the languages from the user's profile.
      • getInvitableFriends

        public List<UserInvitableFriendgetInvitableFriends()
        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
      • getContext

        public FacebookType getContext()
        Social context for this person
        Returns:
        Social context for this person
      • getFirstName

        public String getFirstName()
        The user's first name.
        Returns:
        The user's first name.
      • getMiddleName

        public String getMiddleName()
        The user's middle name.
        Returns:
        The user's middle name.
      • getNameFormat

        public String 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

        public void setNameFormat​(String nameFormat)
        The person's name formatted to correctly handle Chinese, Japanese, or Korean ordering.
      • getLastName

        public String getLastName()
        The user's last name.
        Returns:
        The user's last name.
      • getShortName

        @GraphAPI(since="2.9")
        public String getShortName()
        Shortened, locale-aware name for the person.
        Returns:
        Shortened, locale-aware name for the person
      • setShortName

        public void setShortName​(String shortName)
        Shortened, locale-aware name for the person.
      • getCover

        public CoverPhoto getCover()
        The person's cover photo
        Returns:
        The person's cover photo
      • getLink

        public String getLink()
        A link to the user's profile.
        Returns:
        A link to the user's profile.
      • setLink

        public void setLink​(String link)
        A link to the user's profile.
      • getBio

        @GraphAPI(until="2.7")
        public String getBio()
        The user's biographical snippet.
        Returns:
        The user's biographical snippet.
      • setBio

        public void setBio​(String bio)
        The user's biographical snippet.
      • getQuotes

        public String getQuotes()
        The user's favorite quotes.
        Returns:
        The user's favorite quotes.
      • setQuotes

        public void setQuotes​(String quotes)
        The user's favorite quotes.
      • getAbout

        @Deprecated
        public String getAbout()
        Deprecated.
        since breaking change on 4 April, 2018
        The user's blurb that appears under their profile picture.
        Returns:
        The user's blurb that appears under their profile picture.
      • setAbout

        @Deprecated
        public void setAbout​(String about)
        Deprecated.
        since breaking change on 4 April, 2018
        The user's blurb that appears under their profile picture.
      • getRelationshipStatus

        @Deprecated
        public String getRelationshipStatus()
        Deprecated.
        since breaking change on 4 April, 2018
        The user's relationship status.
        Returns:
        The user's relationship status.
      • getReligion

        @Deprecated
        public String getReligion()
        Deprecated.
        since breaking change on 4 April, 2018
        The user's religion.
        Returns:
        The user's religion.
      • setReligion

        @Deprecated
        public void setReligion​(String religion)
        Deprecated.
        since breaking change on 4 April, 2018
        The user's religion.
      • getAgeRange

        public User.AgeRange getAgeRange()
        Unspecific age range that this person's age fits into.
        Returns:
        The user's age range
      • setAgeRange

        public void setAgeRange​(User.AgeRange ageRange)
        Unspecific age range that this person's age fits into.
      • getWebsite

        @Deprecated
        public String getWebsite()
        Deprecated.
        since breaking change on 4 April, 2018
        A link to the user's personal website.
        Returns:
        A link to the user's personal website.
      • setWebsite

        @Deprecated
        public void setWebsite​(String website)
        Deprecated.
        since breaking change on 4 April, 2018
        A link to the user's personal website.
      • getBirthday

        public String getBirthday()
        The user's birthday as a String.

        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.

        Returns:
        The user's birthday as a String.
      • setBirthday

        public void setBirthday​(String birthday)
        The user's birthday as a String.

        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.

      • getEmail

        public String getEmail()
        The proxied or contact email address granted by the user.
        Returns:
        The proxied or contact email address granted by the user.
      • setEmail

        public void setEmail​(String email)
        The proxied or contact email address granted by the user.
      • getTimezone

        public Double getTimezone()
        The user's timezone offset.
        Returns:
        The user's timezone offset.
      • setTimezone

        public void setTimezone​(Double timezone)
        The user's timezone offset.
      • getVerified

        public Boolean getVerified()
        Indicates whether the account has been verified. This is distinct from the is_verified field. 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

        public void setVerified​(Boolean verified)
        Indicates whether the account has been verified. This is distinct from the is_verified field. 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
      • getViewerCanSendGift

        public Boolean getViewerCanSendGift()
        Can the viewer send a gift to this person?
        Returns:
        Can the viewer send a gift to this person?
      • getGender

        public String getGender()
        The user's gender.
        Returns:
        The user's gender.
      • getPolitical

        @Deprecated
        public String getPolitical()
        Deprecated.
        since breaking change on 4 April, 2018
        The user's political affiliation.
        Returns:
        The user's political affiliation.
      • setPolitical

        @Deprecated
        public void setPolitical​(String political)
        Deprecated.
        since breaking change on 4 April, 2018
        The user's political affiliation.
      • getLocale

        public String getLocale()
        The user's locale.
        Returns:
        The user's locale.
      • getUsername

        @Deprecated
        public String getUsername()
        Deprecated.
        since graph api 2.0
        The user's Facebook username.
        Returns:
        The user's Facebook username.
        Since:
        1.6.5
      • setUsername

        @Deprecated
        public void setUsername​(String username)
        Deprecated.
        since graph api 2.0
        The user's Facebook username.
        Since:
        1.6.5
      • getPublicKey

        public String getPublicKey()
        The person's PGP public key
        Returns:
        The person's PGP public key
      • setPublicKey

        public void setPublicKey​(String publicKey)
        The person's PGP public key
      • getLikes

        public Likes getLikes()
        The user's Likes
        Returns:
        the user's Likes
      • setLikes

        public void setLikes​(Likes likes)
        The user's Likes
      • getPicture

        public ProfilePictureSource getPicture()
        The user's picture, if provided. To force Facebook to fill the picture field you have to fetch the user with the fields=picture parameter, otherwise the picture is null.
        Returns:
        the user's picture as ProfilePictureSource object
        Since:
        1.6.16
      • setPicture

        public void setPicture​(ProfilePictureSource picture)
        The user's picture, if provided. To force Facebook to fill the picture field you have to fetch the user with the fields=picture parameter, otherwise the picture is null.
        Since:
        1.6.16
      • getHometown

        public NamedFacebookType getHometown()
        Duplicate mapping for "hometown" since FB can return it differently in different situations. -- GETTER -- The user's hometown.

        Sometimes this can be null - check getHometownName() instead in that case.

        Returns:
        The user's hometown.
      • setHometown

        public void setHometown​(NamedFacebookType hometown)
        Duplicate mapping for "hometown" since FB can return it differently in different situations. -- GETTER -- The user's hometown.

        Sometimes this can be null - check getHometownName() instead in that case.

      • getSharedLoginUpgradeRequiredBy

        public Date getSharedLoginUpgradeRequiredBy()
        The time that the shared loginneeds to be upgraded to Business Manager by
        Returns:
        The time that the shared loginneeds to be upgraded to Business Manager by
      • setSharedLoginUpgradeRequiredBy

        public void setSharedLoginUpgradeRequiredBy​(Date sharedLoginUpgradeRequiredBy)
        The time that the shared loginneeds to be upgraded to Business Manager by
      • getTestGroup

        public Long getTestGroup()
        Platform test group
        Returns:
        Platform test group
      • setTestGroup

        public void setTestGroup​(Long testGroup)
        Platform test group
      • getUpdatedTime

        public Date getUpdatedTime()
        Date the user's profile was updated.
        Returns:
        Date the user's profile was updated.
      • setUpdatedTime

        public void setUpdatedTime​(Date updatedTime)
        Date the user's profile was updated.
      • getThirdPartyId

        public String getThirdPartyId()
        An anonymous, but unique identifier for the user.
        Returns:
        An anonymous, but unique identifier for the user.
      • setThirdPartyId

        public void setThirdPartyId​(String thirdPartyId)
        An anonymous, but unique identifier for the user.
      • getTokenForBusiness

        public String 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

        public void setTokenForBusiness​(String tokenForBusiness)
        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
      • getInstalled

        public Boolean getInstalled()
        Is the app making the request installed?
        Returns:
        Is the app making the request installed?
      • setInstalled

        public void setInstalled​(Boolean installed)
        Is the app making the request installed?
      • getIsSharedLogin

        public Boolean getIsSharedLogin()
        Is this a shared login (e.g. a gray user)
        Returns:
        Is this a shared login (e.g. a gray user)
      • setIsSharedLogin

        public void setIsSharedLogin​(Boolean isSharedLogin)
        Is this a shared login (e.g. a gray user)
      • getIsVerified

        public Boolean 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 the verified field
        Returns:
        Is the user verified
      • setIsVerified

        public void setIsVerified​(Boolean isVerified)
        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 verified field