FBDialogs
This class is no longer available in the most recent version of the SDK.
A more recent version of this class is available. Check out the latest version.

Provides methods to display native (i.e., non-Web-based) dialogs to the user.

Discussion:

If you are building an app with a urlSchemeSuffix, you should also set the appropriate plist entry. See [FBSettings defaultUrlSchemeSuffix].

Inherits from:NSObject
Declared in:FBDialogs.h
Class Methods
canPresentMessageDialog

Determines if the device is capable of presenting the message dialog.

+ (BOOL) canPresentMessageDialog;
Discussion:

This is the most basic check for capability for this feature.

Declared In: FBDialogs.h
canPresentMessageDialogWithOpenGraphActionParams:

Determines whether a call to presentMessageDialogWithOpenGraphActionParams:... will successfully present a dialog in the Facebook Messenger app. This is useful for applications that need to modify the available UI controls depending on whether the dialog is available on the current platform.

ParameterDescription
params

The dialog parameters

+ (BOOL) canPresentMessageDialogWithOpenGraphActionParams:(FBOpenGraphActionParams *)params;
Declared In: FBDialogs.h
canPresentMessageDialogWithParams:

Determines whether a call to presentMessageDialogWithParams:... will successfully present a dialog in the Facebook Messenger app. This is useful for applications that need to modify the available UI controls depending on whether the dialog is available on the current platform.

ParameterDescription
params

The dialog parameters

+ (BOOL) canPresentMessageDialogWithParams:(FBLinkShareParams *)params;
Declared In: FBDialogs.h
canPresentMessageDialogWithPhotos

Determines whether a call to presentMessageDialogWithPhotos:... will successfully present a dialog in the Facebook Messenger app. This is useful for applications that need to modify the available UI controls depending on whether the dialog is available on the current platform.

+ (BOOL) canPresentMessageDialogWithPhotos;
Declared In: FBDialogs.h
canPresentOSIntegratedShareDialog

Determines if the device is capable of presenting the OS integrated share dialog.

+ (BOOL) canPresentOSIntegratedShareDialog;
Discussion:

This is the most basic check for capability for this feature.

Declared In: FBDialogs.h
canPresentOSIntegratedShareDialogWithSession:

Determines whether a call to presentShareDialogModallyFrom: will successfully present a dialog. This is useful for applications that need to modify the available UI controls depending on whether the dialog is available on the current platform and for the current user.

ParameterDescription
session

The to use to determine whether or not the user has been authenticated with iOS native authentication. If nil, then [FBSession activeSession] will be checked. See discussion above for the implications of nil or non-nil session.

+ (BOOL) canPresentOSIntegratedShareDialogWithSession:(FBSession *)session;
Declared In: FBDialogs.h
canPresentShareDialog

Determines if the device is capable of presenting the share dialog.

+ (BOOL) canPresentShareDialog;
Discussion:

This is the most basic check for capability for this feature.

Declared In: FBDialogs.h
canPresentShareDialogWithOpenGraphActionParams:

Determines whether a call to presentShareDialogWithOpenGraphActionParams:clientState:handler: will successfully present a dialog in the Facebook application. This is useful for applications that need to modify the available UI controls depending on whether the dialog is available on the current platform.

ParameterDescription
params

The parameters for the FB share dialog.

+ (BOOL) canPresentShareDialogWithOpenGraphActionParams:(FBOpenGraphActionParams *)params;
Discussion:

A return value of YES here indicates that the corresponding presentShareDialogWithOpenGraphActionParams method will return a non-nil FBAppCall for the same params. And vice versa.

Declared In: FBDialogs.h
canPresentShareDialogWithParams:

Determines whether a call to presentShareDialogWithTarget: will successfully present a dialog in the Facebook application. This is useful for applications that need to modify the available UI controls depending on whether the dialog is available on the current platform.

ParameterDescription
params

The parameters for the FB share dialog.

+ (BOOL) canPresentShareDialogWithParams:(FBLinkShareParams *)params;
Discussion:

A return value of YES here indicates that the corresponding presentShareDialogWithParams method will return a non-nil FBAppCall for the same params. And vice versa.

Declared In: FBDialogs.h
canPresentShareDialogWithPhotos

Determines whether a call to presentShareDialogWithPhotoParams: will successfully present a dialog in the Facebook application. This is useful for applications that need to modify the available UI controls depending on whether the dialog is available on the current platform.

+ (BOOL) canPresentShareDialogWithPhotos;
Discussion:

A return value of YES here indicates that the corresponding presentShareDialogWithPhotoParams method will return a non-nil FBAppCall.

Declared In: FBDialogs.h
presentMessageDialogWithLink:handler:

Presents a dialog in the Facebook Messenger app that allows the user to share the supplied link. No session is required, and the app does not need to be authorized to call this.

Note that this will perform an app switch to the Messenger app, and will cause the current app to be suspended. When the share is complete, the Messenger app will redirect to a url of the form "fb{APP_ID}://" that the application must handle. The app should then call [FBAppCall handleOpenURL:sourceApplication:fallbackHandler:] to trigger the appropriate handling. Note that FBAppCall will first try to call the completion handler associated with this method, but since during an app switch, the calling app may be suspended or killed, the app must also give a fallbackHandler to the handleOpenURL: method in FBAppCall.

ParameterDescription
link

The URL link to be attached to the post.

handler

A completion handler that may be called when the status update is complete. May be nil. If non-nil, the handler will always be called asynchronously.

+ (FBAppCall *)
presentMessageDialogWithLink: (NSURL *)link
handler: (FBDialogAppCallCompletionHandler)handler;
Discussion:

A non-nil FBAppCall object is only returned if the corresponding canPresentMessageDialogWithParams method is also returning YES for the same params.

Declared In: FBDialogs.h
presentMessageDialogWithLink:name:caption:description:picture:clientState:handler:

Presents a dialog in the Facebook Messenger app that allows the user to share the supplied link. No session is required, and the app does not need to be authorized to call this.

Note that this will perform an app switch to the Messenger app, and will cause the current app to be suspended. When the share is complete, the Messenger app will redirect to a url of the form "fb{APP_ID}://" that the application must handle. The app should then call [FBAppCall handleOpenURL:sourceApplication:fallbackHandler:] to trigger the appropriate handling. Note that FBAppCall will first try to call the completion handler associated with this method, but since during an app switch, the calling app may be suspended or killed, the app must also give a fallbackHandler to the handleOpenURL: method in FBAppCall.

ParameterDescription
link

The URL link to be attached to the post.

name

The name, or title associated with the link. May be nil.

caption

The caption to be used with the link. May be nil.

description

The description associated with the link. May be nil.

picture

The link to a thumbnail to associate with the link. May be nil.

clientState

An NSDictionary that's passed through when the completion handler is called. This is useful for the app to maintain state about the share request that was made so as to have appropriate action when the handler is called. May be nil.

handler

A completion handler that may be called when the status update is complete. May be nil. If non-nil, the handler will always be called asynchronously.

+ (FBAppCall *)
presentMessageDialogWithLink: (NSURL *)link
name: (NSString *)name
caption: (NSString *)caption
description: (NSString *)description
picture: (NSURL *)picture
clientState: (NSDictionary *)clientState
handler: (FBDialogAppCallCompletionHandler)handler;
Discussion:

A non-nil FBAppCall object is only returned if the corresponding canPresentMessageDialogWithParams method is also returning YES for the same params.

Declared In: FBDialogs.h
presentMessageDialogWithLink:name:handler:

Presents a dialog in the Facebook Messenger app that allows the user to share the supplied link. No session is required, and the app does not need to be authorized to call this.

Note that this will perform an app switch to the Messenger app, and will cause the current app to be suspended. When the share is complete, the Messenger app will redirect to a url of the form "fb{APP_ID}://" that the application must handle. The app should then call [FBAppCall handleOpenURL:sourceApplication:fallbackHandler:] to trigger the appropriate handling. Note that FBAppCall will first try to call the completion handler associated with this method, but since during an app switch, the calling app may be suspended or killed, the app must also give a fallbackHandler to the handleOpenURL: method in FBAppCall.

ParameterDescription
link

The URL link to be attached to the post.

name

The name, or title associated with the link. May be nil.

handler

A completion handler that may be called when the status update is complete. May be nil. If non-nil, the handler will always be called asynchronously.

+ (FBAppCall *)
presentMessageDialogWithLink: (NSURL *)link
name: (NSString *)name
handler: (FBDialogAppCallCompletionHandler)handler;
Discussion:

A non-nil FBAppCall object is only returned if the corresponding canPresentMessageDialogWithParams method is also returning YES for the same params.

Declared In: FBDialogs.h
presentMessageDialogWithOpenGraphAction:actionType:previewPropertyName:clientState:handler:

Presents a dialog in the Facebook Messenger app that allows the user to publish the supplied Open Graph action. No session is required, and the app does not need to be authorized to call this.

Note that this will perform an app switch to the Messenger app, and will cause the current app to be suspended. When the share is complete, the Messenger app will redirect to a url of the form "fb{APP_ID}://" that the application must handle. The app should then call [FBAppCall handleOpenURL:sourceApplication:fallbackHandler:] to trigger the appropriate handling. Note that FBAppCall will first try to call the completion handler associated with this method, but since during an app switch, the calling app may be suspended or killed, the app must also give a fallbackHandler to the handleOpenURL: method in FBAppCall.

ParameterDescription
action

The Open Graph action to be published. May not be nil.

actionType

The fully-specified Open Graph action type of the action (e.g., my_app_namespace:my_action).

previewPropertyName

The name of the property on the action that represents the primary Open Graph object associated with the action; this object will be displayed in the preview portion of the share dialog.

clientState

An NSDictionary that's passed through when the completion handler is called. This is useful for the app to maintain state about the share request that was made so as to have appropriate action when the handler is called. May be nil.

handler

A completion handler that may be called when the status update is complete. May be nil. If non-nil, the handler will always be called asynchronously.

+ (FBAppCall *)
presentMessageDialogWithOpenGraphAction: (id<FBOpenGraphAction>)action
actionType: (NSString *)actionType
previewPropertyName: (NSString *)previewPropertyName
clientState: (NSDictionary *)clientState
handler: (FBDialogAppCallCompletionHandler)handler;
Discussion:

A non-nil FBAppCall object is only returned if the corresponding canPresentMessageDialogWithOpenGraphActionParams method is also returning YES for the same params.

Declared In: FBDialogs.h
presentMessageDialogWithOpenGraphActionParams:clientState:handler:

Presents a dialog in the Facebook Messenger app that allows the user to publish an Open Graph action. No session is required, and the app does not need to be authorized to call this.

Note that this will perform an app switch to the Messenger app, and will cause the current app to be suspended. When the share is complete, the Messenger app will redirect to a url of the form "fb{APP_ID}://" that the application must handle. The app should then call [FBAppCall handleOpenURL:sourceApplication:fallbackHandler:] to trigger the appropriate handling. Note that FBAppCall will first try to call the completion handler associated with this method, but since during an app switch, the calling app may be suspended or killed, the app must also give a fallbackHandler to the handleOpenURL: method in FBAppCall.

ParameterDescription
params

The parameters for the Open Graph action dialog.

clientState

An NSDictionary that's passed through when the completion handler is called. This is useful for the app to maintain state about the share request that was made so as to have appropriate action when the handler is called. May be nil.

handler

A completion handler that may be called when the status update is complete. May be nil. If non-nil, the handler will always be called asynchronously.

+ (FBAppCall *)
presentMessageDialogWithOpenGraphActionParams: (FBOpenGraphActionParams *)params
clientState: (NSDictionary *)clientState
handler: (FBDialogAppCallCompletionHandler)handler;
Discussion:

A non-nil FBAppCall object is only returned if the corresponding canPresentMessageDialogWithOpenGraphActionParams: method is also returning YES for the same params.

Declared In: FBDialogs.h
presentMessageDialogWithParams:clientState:handler:

Presents a dialog in the Facebook Messenger app that allows the user to share a status update that may include text, images, or URLs. No session is required, and the app does not need to be authorized to call this.

Note that this will perform an app switch to the Messenger app, and will cause the current app to be suspended. When the share is complete, the Messenger app will redirect to a url of the form "fb{APP_ID}://" that the application must handle. The app should then call [FBAppCall handleOpenURL:sourceApplication:fallbackHandler:] to trigger the appropriate handling. Note that FBAppCall will first try to call the completion handler associated with this method, but since during an app switch, the calling app may be suspended or killed, the app must also give a fallbackHandler to the handleOpenURL: method in FBAppCall.

ParameterDescription
params

The parameters for the Message Dialog. The "friends" and "place" properties will be ignored as the Facebook Messenger app does not support tagging.

clientState

An NSDictionary that's passed through when the completion handler is called. This is useful for the app to maintain state about the share request that was made so as to have appropriate action when the handler is called. May be nil.

handler

A completion handler that may be called when the status update is complete. May be nil. If non-nil, the handler will always be called asynchronously.

+ (FBAppCall *)
presentMessageDialogWithParams: (FBLinkShareParams *)params
clientState: (NSDictionary *)clientState
handler: (FBDialogAppCallCompletionHandler)handler;
Discussion:

A non-nil FBAppCall object is only returned if the corresponding canPresentMessageDialogWithParams: method is also returning YES for the same params.

Declared In: FBDialogs.h
presentMessageDialogWithPhotoParams:clientState:handler:

Presents a dialog in the Facebook Messenger app that allows the user to send the supplied photo(s). No session is required, and the app does not need to be authorized to call this.

Note that this will perform an app switch to the Messenger app, and will cause the current app to be suspended. When the share is complete, the Messenger app will redirect to a url of the form "fb{APP_ID}://" that the application must handle. The app should then call [FBAppCall handleOpenURL:sourceApplication:fallbackHandler:] to trigger the appropriate handling. Note that FBAppCall will first try to call the completion handler associated with this method, but since during an app switch, the calling app may be suspended or killed, the app must also give a fallbackHandler to the handleOpenURL: method in FBAppCall.

ParameterDescription
params

The parameters for the Message Dialog

clientState

An NSDictionary that's passed through when the completion handler is called. This is useful for the app to maintain state about the share request that was made so as to have appropriate action when the handler is called. May be nil.

handler

A completion handler that may be called when the status update is complete. May be nil. If non-nil, the handler will always be called asynchronously.

+ (FBAppCall *)
presentMessageDialogWithPhotoParams: (FBPhotoParams *)params
clientState: (NSDictionary *)clientState
handler: (FBDialogAppCallCompletionHandler)handler;
Discussion:

A non-nil FBAppCall object is only returned if the corresponding canPresentMessageDialogWithPhotos method is also returning YES.

Declared In: FBDialogs.h
presentMessageDialogWithPhotos:clientState:handler:

Presents a dialog in the Facebook Messenger app that allows the user to send the supplied photo(s). No session is required, and the app does not need to be authorized to call this.

Note that this will perform an app switch to the Messenger app, and will cause the current app to be suspended. When the share is complete, the Messenger app will redirect to a url of the form "fb{APP_ID}://" that the application must handle. The app should then call [FBAppCall handleOpenURL:sourceApplication:fallbackHandler:] to trigger the appropriate handling. Note that FBAppCall will first try to call the completion handler associated with this method, but since during an app switch, the calling app may be suspended or killed, the app must also give a fallbackHandler to the handleOpenURL: method in FBAppCall.

ParameterDescription
photos

An NSArray containing UIImages to be shared.

clientState

An NSDictionary that's passed through when the completion handler is called. This is useful for the app to maintain state about the share request that was made so as to have appropriate action when the handler is called. May be nil.

handler

A completion handler that may be called when the status update is complete. May be nil. If non-nil, the handler will always be called asynchronously.

+ (FBAppCall *)
presentMessageDialogWithPhotos: (NSArray *)photos
clientState: (NSDictionary *)clientState
handler: (FBDialogAppCallCompletionHandler)handler;
Discussion:

A non-nil FBAppCall object is only returned if the corresponding canPresentMessageDialogWithPhotos method is also returning YES.

Declared In: FBDialogs.h
presentMessageDialogWithPhotos:handler:

Presents a dialog in the Facebook Messenger app that allows the user to send the supplied photo(s). No session is required, and the app does not need to be authorized to call this.

Note that this will perform an app switch to the Messenger app, and will cause the current app to be suspended. When the share is complete, the Messenger app will redirect to a url of the form "fb{APP_ID}://" that the application must handle. The app should then call [FBAppCall handleOpenURL:sourceApplication:fallbackHandler:] to trigger the appropriate handling. Note that FBAppCall will first try to call the completion handler associated with this method, but since during an app switch, the calling app may be suspended or killed, the app must also give a fallbackHandler to the handleOpenURL: method in FBAppCall.

ParameterDescription
photos

An NSArray containing UIImages to be shared.

handler

A completion handler that may be called when the status update is complete. May be nil. If non-nil, the handler will always be called asynchronously.

+ (FBAppCall *)
presentMessageDialogWithPhotos: (NSArray *)photos
handler: (FBDialogAppCallCompletionHandler)handler;
Discussion:

A non-nil FBAppCall object is only returned if the corresponding canPresentMessageDialogWithPhotos method is also returning YES.

Declared In: FBDialogs.h
presentOSIntegratedShareDialogModallyFrom:initialText:image:url:handler:

Presents a dialog that allows the user to share a status update that may include text, images, or URLs. This dialog is only available on iOS 6.0 and above. The current active session returned by [FBSession activeSession] will be used to determine whether the dialog will be displayed. If a session is active, it must be open and the login method used to authenticate the user must be native iOS 6.0 authentication. If no session active, then whether the call succeeds or not will depend on whether Facebook integration has been configured.

ParameterDescription
viewController

The view controller which will present the dialog.

initialText

The text which will initially be populated in the dialog. The user will have the opportunity to edit this text before posting it. May be nil.

image

A UIImage that will be attached to the status update. May be nil.

url

An NSURL that will be attached to the status update. May be nil.

handler

A handler that will be called when the dialog is dismissed, or if an error occurs. May be nil.

+ (BOOL)
presentOSIntegratedShareDialogModallyFrom: (UIViewController *)viewController
initialText: (NSString *)initialText
image: (UIImage *)image
url: (NSURL *)url
handler: (FBOSIntegratedShareDialogHandler)handler;
Declared In: FBDialogs.h
presentOSIntegratedShareDialogModallyFrom:initialText:images:urls:handler:

Presents a dialog that allows the user to share a status update that may include text, images, or URLs. This dialog is only available on iOS 6.0 and above. The current active session returned by [FBSession activeSession] will be used to determine whether the dialog will be displayed. If a session is active, it must be open and the login method used to authenticate the user must be native iOS 6.0 authentication. If no session active, then whether the call succeeds or not will depend on whether Facebook integration has been configured.

ParameterDescription
viewController

The view controller which will present the dialog.

initialText

The text which will initially be populated in the dialog. The user will have the opportunity to edit this text before posting it. May be nil.

images

An array of UIImages that will be attached to the status update. May be nil.

urls

An array of NSURLs that will be attached to the status update. May be nil.

handler

A handler that will be called when the dialog is dismissed, or if an error occurs. May be nil.

+ (BOOL)
presentOSIntegratedShareDialogModallyFrom: (UIViewController *)viewController
initialText: (NSString *)initialText
images: (NSArray *)images
urls: (NSArray *)urls
handler: (FBOSIntegratedShareDialogHandler)handler;
Declared In: FBDialogs.h
presentOSIntegratedShareDialogModallyFrom:session:initialText:images:urls:handler:

Presents a dialog that allows the user to share a status update that may include text, images, or URLs. This dialog is only available on iOS 6.0 and above. An FBSession may be specified, or nil may be passed to indicate that the current active session should be used. If a session is specified (whether explicitly or by virtue of being the active session), it must be open and the login method used to authenticate the user must be native iOS 6.0 authentication. If no session is specified (and there is no active session), then whether the call succeeds or not will depend on whether Facebook integration has been configured.

ParameterDescription
viewController

The view controller which will present the dialog.

session

The to use to determine whether or not the user has been authenticated with iOS native authentication. If nil, then [FBSession activeSession] will be checked. See discussion above for the implications of nil or non-nil session.

initialText

The text which will initially be populated in the dialog. The user will have the opportunity to edit this text before posting it. May be nil.

images

An array of UIImages that will be attached to the status update. May be nil.

urls

An array of NSURLs that will be attached to the status update. May be nil.

handler

A handler that will be called when the dialog is dismissed, or if an error occurs. May be nil.

+ (BOOL)
presentOSIntegratedShareDialogModallyFrom: (UIViewController *)viewController
session: (FBSession *)session
initialText: (NSString *)initialText
images: (NSArray *)images
urls: (NSArray *)urls
handler: (FBOSIntegratedShareDialogHandler)handler;
Declared In: FBDialogs.h
presentShareDialogWithLink:handler:

Presents a dialog in the Facebook application that allows the user to share the supplied link. No session is required, and the app does not need to be authorized to call this.

Note that this will perform an app switch to the Facebook app, and will cause the current app to be suspended. When the share is complete, the Facebook app will redirect to a url of the form "fb{APP_ID}://" that the application must handle. The app should then call [FBAppCall handleOpenURL:sourceApplication:fallbackHandler:] to trigger the appropriate handling. Note that FBAppCall will first try to call the completion handler associated with this method, but since during an app switch, the calling app may be suspended or killed, the app must also give a fallbackHandler to the handleOpenURL: method in FBAppCall.

ParameterDescription
link

The URL link to be attached to the post.

handler

A completion handler that may be called when the status update is complete. May be nil. If non-nil, the handler will always be called asynchronously.

+ (FBAppCall *)
presentShareDialogWithLink: (NSURL *)link
handler: (FBDialogAppCallCompletionHandler)handler;
Discussion:

A non-nil FBAppCall object is only returned if the corresponding canPresentShareDialogWithParams method is also returning YES for the same params.

Declared In: FBDialogs.h
presentShareDialogWithLink:name:caption:description:picture:clientState:handler:

Presents a dialog in the Facebook application that allows the user to share the supplied link. No session is required, and the app does not need to be authorized to call this.

Note that this will perform an app switch to the Facebook app, and will cause the current app to be suspended. When the share is complete, the Facebook app will redirect to a url of the form "fb{APP_ID}://" that the application must handle. The app should then call [FBAppCall handleOpenURL:sourceApplication:fallbackHandler:] to trigger the appropriate handling. Note that FBAppCall will first try to call the completion handler associated with this method, but since during an app switch, the calling app may be suspended or killed, the app must also give a fallbackHandler to the handleOpenURL: method in FBAppCall.

ParameterDescription
link

The URL link to be attached to the post.

name

The name, or title associated with the link. May be nil.

caption

The caption to be used with the link. May be nil.

description

The description associated with the link. May be nil.

picture

The link to a thumbnail to associate with the link. May be nil.

clientState

An NSDictionary that's passed through when the completion handler is called. This is useful for the app to maintain state about the share request that was made so as to have appropriate action when the handler is called. May be nil.

handler

A completion handler that may be called when the status update is complete. May be nil. If non-nil, the handler will always be called asynchronously.

+ (FBAppCall *)
presentShareDialogWithLink: (NSURL *)link
name: (NSString *)name
caption: (NSString *)caption
description: (NSString *)description
picture: (NSURL *)picture
clientState: (NSDictionary *)clientState
handler: (FBDialogAppCallCompletionHandler)handler;
Discussion:

A non-nil FBAppCall object is only returned if the corresponding canPresentShareDialogWithParams method is also returning YES for the same params.

Declared In: FBDialogs.h
presentShareDialogWithLink:name:handler:

Presents a dialog in the Facebook application that allows the user to share the supplied link. No session is required, and the app does not need to be authorized to call this.

Note that this will perform an app switch to the Facebook app, and will cause the current app to be suspended. When the share is complete, the Facebook app will redirect to a url of the form "fb{APP_ID}://" that the application must handle. The app should then call [FBAppCall handleOpenURL:sourceApplication:fallbackHandler:] to trigger the appropriate handling. Note that FBAppCall will first try to call the completion handler associated with this method, but since during an app switch, the calling app may be suspended or killed, the app must also give a fallbackHandler to the handleOpenURL: method in FBAppCall.

ParameterDescription
link

The URL link to be attached to the post.

name

The name, or title associated with the link. May be nil.

handler

A completion handler that may be called when the status update is complete. May be nil. If non-nil, the handler will always be called asynchronously.

+ (FBAppCall *)
presentShareDialogWithLink: (NSURL *)link
name: (NSString *)name
handler: (FBDialogAppCallCompletionHandler)handler;
Discussion:

A non-nil FBAppCall object is only returned if the corresponding canPresentShareDialogWithParams method is also returning YES for the same params.

Declared In: FBDialogs.h
presentShareDialogWithOpenGraphAction:actionType:previewPropertyName:clientState:handler:

Presents a dialog in the Facebook application that allows the user to publish the supplied Open Graph action. No session is required, and the app does not need to be authorized to call this.

Note that this will perform an app switch to the Facebook app, and will cause the current app to be suspended. When the share is complete, the Facebook app will redirect to a url of the form "fb{APP_ID}://" that the application must handle. The app should then call [FBAppCall handleOpenURL:sourceApplication:fallbackHandler:] to trigger the appropriate handling. Note that FBAppCall will first try to call the completion handler associated with this method, but since during an app switch, the calling app may be suspended or killed, the app must also give a fallbackHandler to the handleOpenURL: method in FBAppCall.

ParameterDescription
action

The Open Graph action to be published. May not be nil.

actionType

The fully-specified Open Graph action type of the action (e.g., my_app_namespace:my_action).

previewPropertyName

The name of the property on the action that represents the primary Open Graph object associated with the action; this object will be displayed in the preview portion of the share dialog.

clientState

An NSDictionary that's passed through when the completion handler is called. This is useful for the app to maintain state about the share request that was made so as to have appropriate action when the handler is called. May be nil.

handler

A completion handler that may be called when the status update is complete. May be nil. If non-nil, the handler will always be called asynchronously.

+ (FBAppCall *)
presentShareDialogWithOpenGraphAction: (id<FBOpenGraphAction>)action
actionType: (NSString *)actionType
previewPropertyName: (NSString *)previewPropertyName
clientState: (NSDictionary *)clientState
handler: (FBDialogAppCallCompletionHandler)handler;
Discussion:

A non-nil FBAppCall object is only returned if the corresponding canPresentShareDialogWithOpenGraphActionParams method is also returning YES for the same params.

Declared In: FBDialogs.h
presentShareDialogWithOpenGraphActionParams:clientState:handler:

Presents a dialog in the Facebook application that allows the user to publish an Open Graph action. No session is required, and the app does not need to be authorized to call this.

Note that this will perform an app switch to the Facebook app, and will cause the current app to be suspended. When the share is complete, the Facebook app will redirect to a url of the form "fb{APP_ID}://" that the application must handle. The app should then call [FBAppCall handleOpenURL:sourceApplication:fallbackHandler:] to trigger the appropriate handling. Note that FBAppCall will first try to call the completion handler associated with this method, but since during an app switch, the calling app may be suspended or killed, the app must also give a fallbackHandler to the handleOpenURL: method in FBAppCall.

ParameterDescription
params

The parameters for the Open Graph action dialog.

clientState

An NSDictionary that's passed through when the completion handler is called. This is useful for the app to maintain state about the share request that was made so as to have appropriate action when the handler is called. May be nil.

handler

A completion handler that may be called when the status update is complete. May be nil. If non-nil, the handler will always be called asynchronously.

+ (FBAppCall *)
presentShareDialogWithOpenGraphActionParams: (FBOpenGraphActionParams *)params
clientState: (NSDictionary *)clientState
handler: (FBDialogAppCallCompletionHandler)handler;
Discussion:

A non-nil FBAppCall object is only returned if the corresponding canPresentShareDialogWithOpenGraphActionParams method is also returning YES for the same params.

Declared In: FBDialogs.h
presentShareDialogWithParams:clientState:handler:

Presents a dialog in the Facebook application that allows the user to share a status update that may include text, images, or URLs. No session is required, and the app does not need to be authorized to call this.

Note that this will perform an app switch to the Facebook app, and will cause the current app to be suspended. When the share is complete, the Facebook app will redirect to a url of the form "fb{APP_ID}://" that the application must handle. The app should then call [FBAppCall handleOpenURL:sourceApplication:fallbackHandler:] to trigger the appropriate handling. Note that FBAppCall will first try to call the completion handler associated with this method, but since during an app switch, the calling app may be suspended or killed, the app must also give a fallbackHandler to the handleOpenURL: method in FBAppCall.

ParameterDescription
params

The parameters for the FB share dialog.

clientState

An NSDictionary that's passed through when the completion handler is called. This is useful for the app to maintain state about the share request that was made so as to have appropriate action when the handler is called. May be nil.

handler

A completion handler that may be called when the status update is complete. May be nil. If non-nil, the handler will always be called asynchronously.

+ (FBAppCall *)
presentShareDialogWithParams: (FBLinkShareParams *)params
clientState: (NSDictionary *)clientState
handler: (FBDialogAppCallCompletionHandler)handler;
Discussion:

A non-nil FBAppCall object is only returned if the corresponding canPresentShareDialogWithParams method is also returning YES for the same params.

Declared In: FBDialogs.h
presentShareDialogWithPhotoParams:clientState:handler:

Presents a dialog in the Facebook application that allows the user to share the supplied photo(s). No session is required, and the app does not need to be authorized to call this.

Note that this will perform an app switch to the Facebook app, and will cause the current app to be suspended. When the share is complete, the Facebook app will redirect to a url of the form "fb{APP_ID}://" that the application must handle. The app should then call [FBAppCall handleOpenURL:sourceApplication:fallbackHandler:] to trigger the appropriate handling. Note that FBAppCall will first try to call the completion handler associated with this method, but since during an app switch, the calling app may be suspended or killed, the app must also give a fallbackHandler to the handleOpenURL: method in FBAppCall.

ParameterDescription
params

The parameters for the FB share dialog.

clientState

An NSDictionary that's passed through when the completion handler is called. This is useful for the app to maintain state about the share request that was made so as to have appropriate action when the handler is called. May be nil.

handler

A completion handler that may be called when the status update is complete. May be nil. If non-nil, the handler will always be called asynchronously.

+ (FBAppCall *)
presentShareDialogWithPhotoParams: (FBPhotoParams *)params
clientState: (NSDictionary *)clientState
handler: (FBDialogAppCallCompletionHandler)handler;
Discussion:

A non-nil FBAppCall object is only returned if the corresponding canPresentShareDialogWithPhotoParams method is also returning YES for the same params.

Declared In: FBDialogs.h
presentShareDialogWithPhotos:clientState:handler:

Presents a dialog in the Facebook application that allows the user to share the supplied photo(s). No session is required, and the app does not need to be authorized to call this.

Note that this will perform an app switch to the Facebook app, and will cause the current app to be suspended. When the share is complete, the Facebook app will redirect to a url of the form "fb{APP_ID}://" that the application must handle. The app should then call [FBAppCall handleOpenURL:sourceApplication:fallbackHandler:] to trigger the appropriate handling. Note that FBAppCall will first try to call the completion handler associated with this method, but since during an app switch, the calling app may be suspended or killed, the app must also give a fallbackHandler to the handleOpenURL: method in FBAppCall.

ParameterDescription
photos

An NSArray containing UIImages to be shared.

clientState

An NSDictionary that's passed through when the completion handler is called. This is useful for the app to maintain state about the share request that was made so as to have appropriate action when the handler is called. May be nil.

handler

A completion handler that may be called when the status update is complete. May be nil. If non-nil, the handler will always be called asynchronously.

+ (FBAppCall *)
presentShareDialogWithPhotos: (NSArray *)photos
clientState: (NSDictionary *)clientState
handler: (FBDialogAppCallCompletionHandler)handler;
Discussion:

A non-nil FBAppCall object is only returned if the corresponding canPresentShareDialogWithPhotoParams method is also returning YES for the same params.

Declared In: FBDialogs.h
presentShareDialogWithPhotos:handler:

Presents a dialog in the Facebook application that allows the user to share the supplied photo(s). No session is required, and the app does not need to be authorized to call this.

Note that this will perform an app switch to the Facebook app, and will cause the current app to be suspended. When the share is complete, the Facebook app will redirect to a url of the form "fb{APP_ID}://" that the application must handle. The app should then call [FBAppCall handleOpenURL:sourceApplication:fallbackHandler:] to trigger the appropriate handling. Note that FBAppCall will first try to call the completion handler associated with this method, but since during an app switch, the calling app may be suspended or killed, the app must also give a fallbackHandler to the handleOpenURL: method in FBAppCall.

ParameterDescription
photos

An NSArray containing UIImages to be shared. May be nil.

handler

A completion handler that may be called when the status update is complete. May be nil. If non-nil, the handler will always be called asynchronously.

+ (FBAppCall *)
presentShareDialogWithPhotos: (NSArray *)photos
handler: (FBDialogAppCallCompletionHandler)handler;
Discussion:

A non-nil FBAppCall object is only returned if the corresponding canPresentShareDialogWithPhotoParams method is also returning YES for the same params.

Declared In: FBDialogs.h
Typedefs
FBDialogAppCallCompletionHandler

A block that when passed to a method in FBDialogs is called back with the results of the AppCall for that dialog.

typedef void (^FBDialogAppCallCompletionHandler)(
FBAppCall *call,
NSDictionary *results,
NSError *error);
Discussion:

This will be called on the UI thread, once the AppCall completes.

Declared In: FBDialogs.h
FBNativeDialogResult

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

typedef enum {
FBOSIntegratedShareDialogResultSucceeded = 0,
FBOSIntegratedShareDialogResultCancelled = 1,
FBOSIntegratedShareDialogResultError = 2
} FBOSIntegratedShareDialogResult;
ConstantDescription
FBOSIntegratedShareDialogResultSucceeded

Indicates that the dialog action completed successfully.

FBOSIntegratedShareDialogResultCancelled

Indicates that the dialog action was cancelled (either by the user or the system).

FBOSIntegratedShareDialogResultError

Indicates that the dialog could not be shown (because not on ios6 or ios6 auth was not used).

Discussion:

Enum

Declared In: FBDialogs.h
FBOSIntegratedShareDialogHandler

Defines a handler that will be called in response to the native share dialog being displayed.

typedef void (^FBOSIntegratedShareDialogHandler)(
FBOSIntegratedShareDialogResult result,
NSError *error);
Declared In: FBDialogs.h
FBOSIntegratedShareDialogResult

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

typedef enum {
FBOSIntegratedShareDialogResultSucceeded = 0,
FBOSIntegratedShareDialogResultCancelled = 1,
FBOSIntegratedShareDialogResultError = 2
} FBOSIntegratedShareDialogResult;
ConstantDescription
FBOSIntegratedShareDialogResultSucceeded

Indicates that the dialog action completed successfully.

FBOSIntegratedShareDialogResultCancelled

Indicates that the dialog action was cancelled (either by the user or the system).

FBOSIntegratedShareDialogResultError

Indicates that the dialog could not be shown (because not on ios6 or ios6 auth was not used).

Discussion:

Enum

Declared In: FBDialogs.h