Profile
有此級別的更新版本。前往查看 最新版本。

This class represents a basic Facebook profile.

伸延:Object
實作Parcelable
套件:facebook
建構函式
Profile(String, String, String, String, String, Uri)

Contructor.

public Profile(String id, String firstName, String middleName, String lastName, String name, Uri linkUri)
參數說明
idThe id of the profile.
firstNameThe first name of the profile. Can be null.
middleNameThe middle name of the profile. Can be null.
lastNameThe last name of the profile. Can be null.
nameThe name of the profile. Can be null.
linkUriThe link for this profile. Can be null.
類別方式
getCurrentProfile()

Getter for the profile that is currently logged in to the application.

public static Profile getCurrentProfile()
Returns
The profile that is currently logged in to the application.
setCurrentProfile(Profile)

Setter for the profile that is currently logged in to the application. If the access token is invalidated, the current profile will not be updated. It's only updated when there is an explicit logout, login or when permissions change via the LoginManager.

public static void setCurrentProfile(Profile profile)
參數說明
profileThe profile that is currently logged in to the application.
fetchProfileForCurrentAccessToken()

Fetches and sets the current profile from the current access token.

This should only be called from the UI thread.

public static void fetchProfileForCurrentAccessToken()
執行個體方法
getProfilePictureUri(int, int)

Getter for the Uri of the profile picture.

public Uri getProfilePictureUri(int width, int height)
參數說明
widthThe desired width for the profile picture.
heightThe desired height for the profile picture.
Returns
The Uri of the profile picture.
getId()

Getter for the id of the profile.

public String getId()
Returns
Id of the profile.
getFirstName()

Getter for the first name of the profile.

public String getFirstName()
Returns
The first name of the profile.
getMiddleName()

Getter for the middle name of the profile.

public String getMiddleName()
Returns
The middle name of the profile.
getLastName()

Getter for the last name of the profile.

public String getLastName()
Returns
The last name of the profile.
getName()

Getter for the name of the profile.

public String getName()
Returns
The name of the profile.
getLinkUri()

Getter for the link of the profile.

public Uri getLinkUri()
Returns
The link of the profile.
describeContents()

Describe the kinds of special objects contained in this Parcelable's marshalled representation.

public int describeContents()
Returns
A bitmask indicating the set of special object types marshalled by the Parcelable.
describeContents()
public int describeContents()
writeToParcel(Parcel, int)

Flatten this object in to a Parcel.

public void writeToParcel(Parcel dest, int flags)
參數說明
destThe Parcel in which the object should be written.
flagsAdditional flags about how the object should be written. May be 0 or Parcelable.PARCELABLE_WRITE_RETURN_VALUE.
writeToParcel(Parcel, int)
public void writeToParcel(Parcel dest, int flags)
參數說明
dest
flags
常數
CREATOR
public static final Creator CREATOR