The FBAppAction object is used to encapsulate state when a third party app performs an action that requires switching over to the native Facebook app.
Inherits from: | NSObject |
Declared in: | FBAppAction.h |
arguments
The arguments being passed to the entity that will perform the action
@property (nonatomic,
readonly,
copy) NSDictionary *arguments;
FBAppAction.h
clientState
Client JSON state that is necessary in the completion handler for complete context
@property (nonatomic,
readonly,
copy) NSDictionary *clientState;
FBAppAction.h
ID
The ID of this FBAppAction instance
@property (nonatomic,
readonly,
copy) NSString *ID;
FBAppAction.h
method
The method being performed for this action
@property (nonatomic,
readonly,
copy) NSString *method;
FBAppAction.h
handleDidBecomeActive
A helper method that should be called when the application's applicationDidBecomeActive: is invoked, to maintain proper book keeping of pending FBAppActions. If any pending actions are found, their registered callbacks will be invoked with appropriate state
+ (void)
handleDidBecomeActive;
FBAppAction.h
handleOpenURL:sourceApplication:fallbackHandler:
A helper method that is used to provide an implementation for [UIApplicationDelegate application:openURL:sourceApplication:annotation:]. It should be invoked for the proper processing of responses during interaction with the native Facebook app or as part of SSO authorization flow.
+ (BOOL)
handleOpenURL: | (NSURL *)url |
sourceApplication: | (NSString *)sourceApplication |
fallbackHandler: | (FBAppActionCompletionHandler)handler; |
See + handleOpenUrl:withSession:fallbackHandler:
FBAppAction.h
handleOpenURL:sourceApplication:withSession:
A helper method that is used to provide an implementation for [UIApplicationDelegate application:openURL:sourceApplication:annotation:]. It should be invoked for the proper processing of responses during interaction with the native Facebook app or as part of SSO authorization flow.
+ (BOOL)
handleOpenURL: | (NSURL *)url |
sourceApplication: | (NSString *)sourceApplication |
withSession: | (FBSession *)session; |
See + handleOpenUrl:withSession:fallbackHandler:
FBAppAction.h
handleOpenURL:sourceApplication:withSession:fallbackHandler:
A helper method that is used to provide an implementation for [UIApplicationDelegate application:openURL:sourceApplication:annotation:]. It should be invoked for the proper processing of responses during interaction with the native Facebook app or as part of SSO authorization flow.
Parameter | Description |
---|---|
url | The URL as passed to [UIApplicationDelegate application:openURL:sourceApplication:annotation:]. |
sourceApplication | The sourceApplication as passed to [UIApplicationDelegate application:openURL:sourceApplication:annotation:]. |
session | If this url is being sent back to this app as part of SSO authorization flow, then pass in the session that was being opened. A nil value defaults to FBSession.activeSession |
handler | Optional handler to execute if no completion handler was found for the action in this URL. A completion handler is not a requirement for a url to be handled. |
+ (BOOL)
handleOpenURL: | (NSURL *)url |
sourceApplication: | (NSString *)sourceApplication |
withSession: | (FBSession *)session |
fallbackHandler: | (FBAppActionCompletionHandler)handler; |
FBAppAction.h
isEqualToAppAction:
Compares the receiving FBAppAction to the passed in FBAppAction
- (BOOL)
isEqualToAppAction:(FBAppAction *)appAction;
FBAppAction.h
FBAppActionCompletionHandler
A block that is passed to performAction to register for a callback with the results of that action
typedef void (^FBAppActionCompletionHandler)( FBAppAction *action, NSDictionary *results, NSError *error);
Pass a block of this type when calling performAction. This will be called once the action completes. The call occurs on the UI thread.
FBAppAction.h