FBWebDialogs
คลาสนี้ไม่มีให้ใช้งานใน SDK เวอร์ชั่นล่าสุดอีกต่อไป
เวอร์ชั่นที่ใหม่กว่าของคลาสนี้พร้อมแล้ว ตรวจสอบได้ เวอร์ชั่นล่าสุด

Provides methods to display web based dialogs to the user.

Inherits from:NSObject
Declared in:FBWebDialogs.h
วิธีการคลาส
presentDialogModallyWithSession:dialog:parameters:handler:

Presents a Facebook web dialog (https://developers.facebook.com/docs/reference/dialogs/ ) such as feed or apprequest.

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

Represents the session to use for the dialog. May be nil, which uses the active session if present, or returns NO, if not.

dialog

Represents the dialog or method name, such as @"feed"

parameters

A dictionary of parameters to be passed to the dialog

handler

An optional handler that will be called when the dialog is dismissed. Note, that if the method returns NO, the handler is not called. May be nil.

+ (void)
presentDialogModallyWithSession: (FBSession *)session
dialog: (NSString *)dialog
parameters: (NSDictionary *)parameters
handler: (FBWebDialogHandler)handler;
ให้คำรับรองไว้ใน: FBWebDialogs.h
presentDialogModallyWithSession:dialog:parameters:handler:delegate:

Presents a Facebook web dialog (https://developers.facebook.com/docs/reference/dialogs/ ) such as feed or apprequest.

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

Represents the session to use for the dialog. May be nil, which uses the active session if present, or returns NO, if not.

dialog

Represents the dialog or method name, such as @"feed"

parameters

A dictionary of parameters to be passed to the dialog

handler

An optional handler that will be called when the dialog is dismissed. Note, that if the method returns NO, the handler is not called. May be nil.

delegate

An optional delegate to allow for advanced processing of web based dialogs. See 'FBWebDialogsDelegate' for more details.

+ (void)
presentDialogModallyWithSession: (FBSession *)session
dialog: (NSString *)dialog
parameters: (NSDictionary *)parameters
handler: (FBWebDialogHandler)handler
delegate: (id<FBWebDialogsDelegate>)delegate;
ให้คำรับรองไว้ใน: FBWebDialogs.h
presentFeedDialogModallyWithSession:parameters:handler:

Presents a Facebook feed dialog.

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

Represents the session to use for the dialog. May be nil, which uses the active session if present.

parameters

A dictionary of additional parameters to be passed to the dialog. May be nil

handler

An optional handler that will be called when the dialog is dismissed. May be nil.

+ (void)
presentFeedDialogModallyWithSession: (FBSession *)session
parameters: (NSDictionary *)parameters
handler: (FBWebDialogHandler)handler;
ให้คำรับรองไว้ใน: FBWebDialogs.h
presentRequestsDialogModallyWithSession:message:title:parameters:handler:

Presents a Facebook apprequest dialog.

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

Represents the session to use for the dialog. May be nil, which uses the active session if present.

message

The required message for the dialog.

title

An optional title for the dialog.

parameters

A dictionary of additional parameters to be passed to the dialog. May be nil

handler

An optional handler that will be called when the dialog is dismissed. May be nil.

+ (void)
presentRequestsDialogModallyWithSession: (FBSession *)session
message: (NSString *)message
title: (NSString *)title
parameters: (NSDictionary *)parameters
handler: (FBWebDialogHandler)handler;
ให้คำรับรองไว้ใน: FBWebDialogs.h
presentRequestsDialogModallyWithSession:message:title:parameters:handler:friendCache:

Presents a Facebook apprequest dialog.

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

Represents the session to use for the dialog. May be nil, which uses the active session if present.

message

The required message for the dialog.

title

An optional title for the dialog.

parameters

A dictionary of additional parameters to be passed to the dialog. May be nil

handler

An optional handler that will be called when the dialog is dismissed. May be nil.

friendCache

An optional cache object used to enable frictionless sharing for a known set of friends. The cache instance should be preserved for the life of the session and reused for multiple calls to the present method. As the users set of friends enabled for frictionless sharing changes, this method auto-updates the cache.

+ (void)
presentRequestsDialogModallyWithSession: (FBSession *)session
message: (NSString *)message
title: (NSString *)title
parameters: (NSDictionary *)parameters
handler: (FBWebDialogHandler)handler
friendCache: (FBFrictionlessRecipientCache *)friendCache;
ให้คำรับรองไว้ใน: FBWebDialogs.h
Typedefs
FBWebDialogHandler

Defines a handler that will be called in response to the web dialog being dismissed

typedef void (^FBWebDialogHandler)(
FBWebDialogResult result,
NSURL *resultURL,
NSError *error);
ให้คำรับรองไว้ใน: FBWebDialogs.h
NS_ENUM (NSUInteger, FBWebDialogResult)

Passed to a handler to indicate the result of a dialog being displayed to the user.

typedef NS_ENUM(NSUInteger, FBWebDialogResult) {
FBWebDialogResultDialogCompleted = 0,
FBWebDialogResultDialogNotCompleted
};
ค่าคงตัวคำอธิบาย
FBWebDialogResultDialogCompleted

Indicates that the dialog action completed successfully. Note, that cancel operations represent completed dialog operations. The url argument may be used to distinguish between success and user-cancelled cases

FBWebDialogResultDialogNotCompleted

Indicates that the dialog operation was not completed. This occurs in cases such as the closure of the web-view using the X in the upper left corner.

Discussion:

Note FBWebDialogResultDialogCompleted is also used for cancelled operations.

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