Spring Social Facebook

org.springframework.social.facebook.api
Class FacebookProfile

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

public class FacebookProfile
extends java.lang.Object
implements java.io.Serializable

Model class containing a Facebook user's profile information.

Author:
Craig Walls
See Also:
Serialized Form

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

Constructor Detail

FacebookProfile

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

getId

public java.lang.String getId()
The user's Facebook ID

Returns:
The user's Facebook ID

getUsername

public java.lang.String getUsername()
The user's Facebook username

Returns:
the user's Facebook username

getName

public java.lang.String getName()
The user's full name

Returns:
The user's full name

getFirstName

public java.lang.String getFirstName()
The user's first name

Returns:
The user's first name

getMiddleName

public java.lang.String getMiddleName()
The user's middle name

Returns:
The user's middle name

getLastName

public java.lang.String getLastName()
The user's last name

Returns:
The user's last name

getGender

public java.lang.String getGender()
The user's gender

Returns:
the user's gender

getLocale

public java.util.Locale getLocale()
The user's locale

Returns:
the user's locale

getEmail

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

Returns:
The user's email address

getLink

public java.lang.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 java.lang.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 java.lang.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 java.lang.Integer 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 java.util.Date getUpdatedTime()
The last time the user's profile was updated.

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

isVerified

public java.lang.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 java.lang.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 java.lang.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 java.lang.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 java.util.List<java.lang.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 java.util.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 java.util.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 java.util.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 java.util.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 java.util.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 java.lang.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 java.lang.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 java.lang.String getQuotes()
The user's quotations. Available only with "user_about_me" permission.

Returns:
the user's quotations, if available.

getRelationshipStatus

public java.lang.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 java.util.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 java.util.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.

Spring Social Facebook