FBLoginView
คลาสนี้ไม่มีให้ใช้งานใน SDK เวอร์ชั่นล่าสุดอีกต่อไป

FBLoginView is a custom UIView that renders a button to login or logout based on the state of FBSession.activeSession

Discussion:

This view is closely associated with FBSession.activeSession. Upon initialization, it will attempt to open an active session without UI if the current active session is not open.

The FBLoginView instance also monitors for changes to the active session.

Please note: Since FBLoginView observes the active session, using multiple FBLoginView instances in different parts of your app can result in each instance's delegates being notified of changes for one event.

Inherits from:UIView
Declared in:FBLoginView.h
ทรัพย์สิน
defaultAudience

The default audience to use, if publish permissions are requested at login time.

@property (nonatomic, assign) FBSessionDefaultAudience defaultAudience;
ให้คำรับรองไว้ใน: FBLoginView.h
delegate

The delegate object that receives updates for selection and display control.

@property (nonatomic, assign) IBOutlet id<FBLoginViewDelegate> delegate;
ให้คำรับรองไว้ใน: FBLoginView.h
loginBehavior

The login behavior for the active session if the user logs in via this view

@property (nonatomic) FBSessionLoginBehavior loginBehavior;
Discussion:

The default value is FBSessionLoginBehaviorWithFallbackToWebView.

ให้คำรับรองไว้ใน: FBLoginView.h
permissions

The permissions to login with. Defaults to nil, meaning basic permissions.

@property (readwrite, copy) NSArray *permissions __attribute__((deprecated
Discussion:

Methods and properties that specify permissions without a read or publish qualification are deprecated; use of a read-qualified or publish-qualified alternative is preferred.

ให้คำรับรองไว้ใน: FBLoginView.h
publishPermissions

The publish permissions to request if the user logs in via this view.

@property (nonatomic, copy) NSArray *publishPermissions;
Discussion:

Note, that a defaultAudience value of FBSessionDefaultAudienceOnlyMe, FBSessionDefaultAudienceEveryone, or FBSessionDefaultAudienceFriends should be set if publish permissions are specified. Additionally, when publish permissions are specified, then read should not be specified.

ให้คำรับรองไว้ใน: FBLoginView.h
readPermissions

The read permissions to request if the user logs in via this view.

@property (nonatomic, copy) NSArray *readPermissions;
Discussion:

Note, that if read permissions are specified, then publish permissions should not be specified.

ให้คำรับรองไว้ใน: FBLoginView.h
tooltipBehavior

Gets or sets the desired tooltip behavior.

@property (nonatomic, assign) FBLoginViewTooltipBehavior tooltipBehavior;
ให้คำรับรองไว้ใน: FBLoginView.h
tooltipColorStyle

Gets or sets the desired tooltip color style.

@property (nonatomic, assign) FBTooltipColorStyle tooltipColorStyle;
ให้คำรับรองไว้ใน: FBLoginView.h
วิธีการทันใจ
init

Initializes and returns an FBLoginView object. The underlying session has basic permissions granted to it.

- (instancetype) init;
ให้คำรับรองไว้ใน: FBLoginView.h
initWithPermissions:

Initializes and returns an FBLoginView object constructed with the specified permissions.

พารามิเตอร์คำอธิบาย
permissions

An array of strings representing the permissions to request during the authentication flow. A value of nil will indicates basic permissions.

- (instancetype) initWithPermissions:(NSArray *)permissions __attribute__((deprecated));
Discussion:

Methods and properties that specify permissions without a read or publish qualification are deprecated; use of a read-qualified or publish-qualified alternative is preferred.

ให้คำรับรองไว้ใน: FBLoginView.h
initWithPublishPermissions:defaultAudience:

Initializes and returns an FBLoginView object constructed with the specified permissions.

พารามิเตอร์คำอธิบาย
publishPermissions

An array of strings representing the publish permissions to request during the authentication flow.

defaultAudience

An audience for published posts; note that FBSessionDefaultAudienceNone is not valid for permission requests that include publish or manage permissions.

- (instancetype)
initWithPublishPermissions: (NSArray *)publishPermissions
defaultAudience: (FBSessionDefaultAudience)defaultAudience;
ให้คำรับรองไว้ใน: FBLoginView.h
initWithReadPermissions:

Initializes and returns an FBLoginView object constructed with the specified permissions.

พารามิเตอร์คำอธิบาย
readPermissions

An array of strings representing the read permissions to request during the authentication flow. A value of nil will indicates basic permissions.

- (instancetype) initWithReadPermissions:(NSArray *)readPermissions;
ให้คำรับรองไว้ใน: FBLoginView.h
Typedefs
NS_ENUM

Indicates the desired login tooltip behavior.

typedef NS_ENUM(NSUInteger, FBLoginViewTooltipBehavior) {
FBLoginViewTooltipBehaviorDefault = 0,
FBLoginViewTooltipBehaviorForceDisplay = 1,
FBLoginViewTooltipBehaviorDisable = 2
};
ค่าคงตัวคำอธิบาย
FBLoginViewTooltipBehaviorDefault

The default behavior. The tooltip will only be displayed if the app is eligible (determined by server round trip)

FBLoginViewTooltipBehaviorForceDisplay

Force display of the tooltip (typically for UI testing)

FBLoginViewTooltipBehaviorDisable

Force disable. In this case you can still exert more refined control by manually constructing a FBLoginTooltipView instance.

ให้คำรับรองไว้ใน: FBLoginView.h