Facebook Developers
DocsToolsSupportNewsApps
Log In
  • Social Plugins
  • Facebook Login
  • Open Graph
  • Facebook APIs
  • Games
  • Payments
  • App Center
  • Promote Your App
  • iOS
    • Getting Started
    • Concepts
    • Reference
  • Android
  • JavaScript
  • PHP
  • More SDKs
  • Class References
    • FBCacheDescriptor
    • FBFriendPickerViewController
    • FBGraphObject
    • FBLoginView
    • FBPlacePickerViewController
    • FBProfilePictureView
    • FBRequest
    • FBRequestConnection
    • FBSession
    • FBSessionTokenCachingStrategy
    • FBTestSession
    • FBUserSettingsViewController
    • FBViewController
  • Protocol References
    • FBFriendPickerDelegate
    • FBGraphLocation
    • FBGraphObject
    • FBGraphPlace
    • FBGraphUser
    • FBLoginViewDelegate
    • FBOpenGraphAction
    • FBPlacePickerDelegate
    • FBUserSettingsDelegate
    • FBViewControllerDelegate
  • Other References
    • FBError
    • FBSettings

FBProfilePictureView

SDK Reference › iOS SDK › FBProfilePictureView
FBProfilePictureView
Inherits from: UIView
Declared in: FBProfilePictureView.h
Overview

An instance of FBProfilePictureView is used to display a profile picture.

The default behavior of this control is to center the profile picture in the view and shrinks it, if necessary, to the view's bounds, preserving the aspect ratio. The smallest possible image is downloaded to ensure that scaling up never happens. Resizing the view may result in a different size of the image being loaded. Canonical image sizes are documented in the "Pictures" section of https://developers.facebook.com/docs/reference/api.

Tasks
pictureCropping property
profileID property
- init
- initWithProfileID:pictureCropping:
FBProfilePictureCropping enum typedef
Properties
pictureCropping

The cropping to use for the profile picture.

@property (nonatomic) FBProfilePictureCropping pictureCropping;
Declared In
FBProfilePictureView.h
profileID

The Facebook ID of the user, place or object for which a picture should be fetched and displayed.

@property (copy, nonatomic) NSString* profileID;
Declared In
FBProfilePictureView.h
Instance Methods
init

Initializes and returns a profile view object.

- (id)init;
Declared In
FBProfilePictureView.h
initWithProfileID:pictureCropping:

Initializes and returns a profile view object for the given Facebook ID and cropping.

- (id)initWithProfileID:(NSString*)profileID pictureCropping:(FBProfilePictureCropping)pictureCropping;
Parameter
profileID

The Facebook ID of the user, place or object for which a picture should be fetched and displayed.

pictureCropping

The cropping to use for the profile picture.

Declared In
FBProfilePictureView.h
Typedefs
FBProfilePictureCropping enum

Type used to specify the cropping treatment of the profile picture.

typedef enum {
FBProfilePictureCroppingSquare = 0,
FBProfilePictureCroppingOriginal = 1
} FBProfilePictureCropping;
Constants
FBProfilePictureCroppingSquare

Square (default) - the square version that the Facebook user defined.

FBProfilePictureCroppingOriginal

Original - the original profile picture, as uploaded.

Discussion
Declared In
FBProfilePictureView.h

Last Updated: November 19, 2012
Facebook © 2013 · English (US)
AboutAdvertisingCareersPlatform PoliciesPrivacy Policy