FBLikeControl
This class is no longer available in the most recent version of the SDK.

UI control to like an object in the Facebook graph.

Discussion:

Taps on the like button within this control will invoke an API call to the Facebook app through a fast-app-switch that allows the user to like the object. Upon return to the calling app, the view will update with the new state and send actions for the UIControlEventValueChanged event.

Inherits from:UIControl
Declared in:FBLikeControl.h
Properties
foregroundColor

The foreground color to use for the content of the receiver.

@property (nonatomic, strong) UIColor *foregroundColor;
Declared In: FBLikeControl.h
likeControlAuxiliaryPosition

The position for the auxiliary view for the receiver.

@property (nonatomic, assign) FBLikeControlAuxiliaryPosition likeControlAuxiliaryPosition;
Declared In: FBLikeControl.h
likeControlHorizontalAlignment

The text alignment of the social sentence.

@property (nonatomic, assign) FBLikeControlHorizontalAlignment likeControlHorizontalAlignment;
Discussion:

This value is only valid for FBLikeControlStyleStandard with FBLikeControlAuxiliaryPositionTop|Bottom.

Declared In: FBLikeControl.h
likeControlStyle

The style to use for the receiver.

@property (nonatomic, assign) FBLikeControlStyle likeControlStyle;
Declared In: FBLikeControl.h
objectID

The objectID for the object to like.

@property (nonatomic, copy) NSString *objectID;
Discussion:

This value may be an Open Graph object ID or a string representation of an URL that describes an Open Graph object. The objects may be public objects, like pages, or objects that are defined by your application.

Declared In: FBLikeControl.h
objectType

The type of object referenced by the objectID.

@property (nonatomic, assign) FBLikeControlObjectType objectType;
Discussion:

If the objectType is unknown, the control will determine the objectType by querying the server with the objectID. Specifying a value for the objectType is an optimization that should be used if the type is known by the consumer. Consider setting the objectType if you know your objectType when setting the objectID.

Declared In: FBLikeControl.h
preferredMaxLayoutWidth

The preferred maximum width (in points) for autolayout.

@property (nonatomic, assign) CGFloat preferredMaxLayoutWidth;
Discussion:

This property affects the size of the receiver when layout constraints are applied to it. During layout, if the text extends beyond the width specified by this property, the additional text is flowed to one or more new lines, thereby increasing the height of the receiver.

Declared In: FBLikeControl.h
soundEnabled

If YES, a sound is played when the receiver is toggled.

@default YES

@property (nonatomic, assign, getter = isSoundEnabled) BOOL soundEnabled;
Declared In: FBLikeControl.h
Typedefs
NS_ENUM

Specifies the position of the auxiliary view relative to the like button.

typedef NS_ENUM(NSUInteger, FBLikeControlAuxiliaryPosition) {
FBLikeControlAuxiliaryPositionInline,
FBLikeControlAuxiliaryPositionTop,
FBLikeControlAuxiliaryPositionBottom,
};
Discussion:

(NSUInteger, FBLikeControlAuxiliaryPosition)

Declared In: FBLikeControl.h
NS_ENUM

Specifies the horizontal alignment for FBLikeControlStyleStandard with FBLikeControlAuxiliaryPositionTop or FBLikeControlAuxiliaryPositionBottom.

typedef NS_ENUM(NSUInteger, FBLikeControlHorizontalAlignment) {
FBLikeControlHorizontalAlignmentLeft,
FBLikeControlHorizontalAlignmentCenter,
FBLikeControlHorizontalAlignmentRight,
};
Discussion:

FBLikeControlHorizontalAlignment)

Declared In: FBLikeControl.h
NS_ENUM

Specifies the type of object referenced by the objectID of a like control.

typedef NS_ENUM(NSUInteger, FBLikeControlObjectType) {
FBLikeControlObjectTypeUnknown = 0,
FBLikeControlObjectTypeOpenGraphObject,
FBLikeControlObjectTypePage,
};
ConstantDescription
FBLikeControlObjectTypeUnknown

The objectID refers to an unknown object type.

FBLikeControlObjectTypeOpenGraphObject

The objectID refers to an Open Graph object.

FBLikeControlObjectTypePage

The objectID refers to a Page object.

Discussion:

(NSUInteger, FBLikeControlObjectType)

Declared In: FBLikeControl.h
NS_ENUM

Specifies the style of a like control.

typedef NS_ENUM(NSUInteger, FBLikeControlStyle) {
FBLikeControlStyleStandard = 0,
FBLikeControlStyleBoxCount,
FBLikeControlStyleButton,
};
ConstantDescription
FBLikeControlStyleStandard

Displays the button and the social sentence.

FBLikeControlStyleBoxCount

Displays the button and a box that contains the like count.

FBLikeControlStyleButton

Displays the button only.

Discussion:

(NSUInteger, FBLikeControlStyle)

Declared In: FBLikeControl.h
NS_ENUM(NSUInteger,

Specifies the horizontal alignment for FBLikeControlStyleStandard with FBLikeControlAuxiliaryPositionTop or FBLikeControlAuxiliaryPositionBottom.

typedef NS_ENUM(NSUInteger, FBLikeControlHorizontalAlignment) {
FBLikeControlHorizontalAlignmentLeft,
FBLikeControlHorizontalAlignmentCenter,
FBLikeControlHorizontalAlignmentRight,
};
Discussion:

FBLikeControlHorizontalAlignment)

Declared In: FBLikeControl.h