org.springframework.social.facebook.api
Class FacebookProfile

java.lang.Object
  extended by org.springframework.social.facebook.api.FacebookObject
      extended by org.springframework.social.facebook.api.FacebookProfile
All Implemented Interfaces:
Serializable

public class FacebookProfile
extends FacebookObject
implements Serializable

Model class containing a Facebook user's profile information.

See Also:
Serialized Form

Constructor Summary
FacebookProfile(String id, String username, String name, String firstName, String lastName, String gender, Locale locale)
           
 
Method Summary
 String getAbout()
          The user's brief about blurb.
 AgeRange getAgeRange()
          The user's age range.
 String getBio()
          The user's bio.
 String getBirthday()
          The user's birthday.
 List<EducationEntry> getEducation()
          The user's education history.
 String getEmail()
          The user's email address.
 List<Reference> getFavoriteAtheletes()
          A list of references to the user's favorite athletes.
 List<Reference> getFavoriteTeams()
          A list of references to the user's favorite sports teams.
 String getFirstName()
          The user's first name
 String getGender()
          The user's gender
 Reference getHometown()
          The user's hometown.
 String getId()
          The user's Facebook ID
 List<Reference> getInspirationalPeople()
          A list of references to people the user is inspired by.
 List<String> getInterestedIn()
          A list of the genders the user is interested in.
 List<Reference> getLanguages()
          A list of references to languages the user claims to know.
 String getLastName()
          The user's last name
 String getLink()
          A link to the user's profile on Facebook.
 Locale getLocale()
          The user's locale
 Reference getLocation()
          The user's location.
 String getMiddleName()
          The user's middle name
 String getName()
          The user's full name
 String getPolitical()
          The user's political affiliation.
 String getQuotes()
          The user's quotations.
 String getRelationshipStatus()
          The user's relationship status.
 String getReligion()
          The user's religion.
 Reference getSignificantOther()
          The user's significant other.
 List<Reference> getSports()
          A list of references to sports the user plays
 String getThirdPartyId()
          An anonymous, but unique identifier for the user.
 Float getTimezone()
          The user's timezone offset from UTC.
 Date getUpdatedTime()
          The last time the user's profile was updated.
 String getUsername()
          The user's Facebook username
 String getWebsite()
          A link to the user's personal website.
 List<WorkEntry> getWork()
          The user's work history.
 Boolean isVerified()
          The user's account verification status.
 
Methods inherited from class org.springframework.social.facebook.api.FacebookObject
add, getExtraData
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FacebookProfile

public FacebookProfile(String id,
                       String username,
                       String name,
                       String firstName,
                       String lastName,
                       String gender,
                       Locale locale)
Method Detail

getId

public String getId()
The user's Facebook ID

Returns:
The user's Facebook ID

getUsername

public String getUsername()
The user's Facebook username

Returns:
the user's Facebook username

getName

public String getName()
The user's full name

Returns:
The user's full name

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

getLastName

public String getLastName()
The user's last name

Returns:
The user's last name

getGender

public String getGender()
The user's gender

Returns:
the user's gender

getLocale

public Locale getLocale()
The user's locale

Returns:
the user's locale

getEmail

public String getEmail()
The user's email address. Available only with "email" permission.

Returns:
The user's email address

getLink

public String getLink()
A link to the user's profile on Facebook. Available only if requested by an authenticated user.

Returns:
the user's profile link or null if requested anonymously

getWebsite

public String getWebsite()
A link to the user's personal website. Available only with "user_website" or "friends_website" permission.

Returns:
a link to the user's personal website.

getThirdPartyId

public String getThirdPartyId()
An anonymous, but unique identifier for the user. Available only if requested by an authenticated user.

Returns:
the user's third-party ID or null if not available

getTimezone

public Float getTimezone()
The user's timezone offset from UTC. Available only for the authenticated user.

Returns:
the user's timezone offset from UTC or null if the user isn't the authenticated user

getUpdatedTime

public Date getUpdatedTime()
The last time the user's profile was updated.

Returns:
the time that the user's profile was updated

isVerified

public Boolean isVerified()
The user's account verification status. Available only if requested by an authenticated user.

Returns:
true if the profile has been verified, false if it has not, or null if not available.

getAbout

public String getAbout()
The user's brief about blurb. Available only with "user_about_me" permission for the authenticated user or "friends_about_me" for the authenticated user's friends.

Returns:
the user's about blurb, if available.

getBio

public String getBio()
The user's bio. Available only with "user_about_me" permission for the authenticated user.

Returns:
the user's bio, if available.

getBirthday

public String getBirthday()
The user's birthday. Available only with "user_birthday" permission for the authentication user or "friends_birthday" permission for the user's friends.

Returns:
the user's birthday

getLocation

public Reference getLocation()
The user's location. Available only with "user_location" or "friends_location" permission.

Returns:
a Reference to the user's location, if available

getHometown

public Reference getHometown()
The user's hometown. Available only with "user_hometown" or "friends_hometown" permission.

Returns:
a Reference to the user's hometown, if available

getInterestedIn

public List<String> getInterestedIn()
A list of the genders the user is interested in. Available only with "user_relationship_details" or "friends_relationship_details" permission.

Returns:
a list of genders the user is interested in, if available.

getInspirationalPeople

public List<Reference> getInspirationalPeople()
A list of references to people the user is inspired by.

Returns:
a list of Reference to people the user is inspired by, if available.

getLanguages

public List<Reference> getLanguages()
A list of references to languages the user claims to know.

Returns:
a list of Reference to languages the user knows, if available.

getSports

public List<Reference> getSports()
A list of references to sports the user plays

Returns:
a list of References to sports the user plays, if available.

getFavoriteTeams

public List<Reference> getFavoriteTeams()
A list of references to the user's favorite sports teams.

Returns:
a list of References to sports teams the user is a fan of, if available.

getFavoriteAtheletes

public List<Reference> getFavoriteAtheletes()
A list of references to the user's favorite athletes.

Returns:
a list of References to athletes the user is a fan of, if available.

getReligion

public String getReligion()
The user's religion. Available only with "user_religion_politics" or "friends_religion_politics" permission.

Returns:
the user's religion, if available.

getPolitical

public String getPolitical()
The user's political affiliation. Available only with "user_religion_politics" or "friends_religion_politics" permission.

Returns:
the user's political affiliation, if available.

getQuotes

public String getQuotes()
The user's quotations. Available only with "user_about_me" permission.

Returns:
the user's quotations, if available.

getRelationshipStatus

public String getRelationshipStatus()
The user's relationship status. Available only with "user_relationships" or "friends_relationships" permission.

Returns:
the user's relationship status, if available.

getSignificantOther

public Reference getSignificantOther()
The user's significant other. Available only for certain relationship statuses and with "user_relationship_details" or "friends_relationship_details" permission.

Returns:
a Reference to the user's significant other, if available.

getWork

public List<WorkEntry> getWork()
The user's work history. Available only with "user_work_history" or "friends_work_history" permission.

Returns:
a list of WorkEntry items, one for each entry in the user's work history.

getEducation

public List<EducationEntry> getEducation()
The user's education history. Available only with "user_education_history" or "friends_education_history" permission.

Returns:
a list of EducationEntry items, one for each entry in the user's education history.

getAgeRange

public AgeRange getAgeRange()
The user's age range.

Returns:
an AgeRange for the user. Will be AgeRange.UNKNOWN if the age_range isn't available or if the range given does match the known ranges.