FBAppCall
最新バージョンのSDKではこのクラスは使用できません。

The FBAppCall object is used to encapsulate state when the app performs an action that requires switching over to the native Facebook app, or when the app receives an App Link.

Discussion:
  • Each FBAppCall instance will have a unique ID
  • This object is passed into an FBAppCallHandler for context
  • dialogData will be present if this AppCall is for a Native Dialog
  • appLinkData will be present if this AppCall is for an App Link
  • accessTokenData will be present if this AppCall contains an access token.
Inherits from:NSObject
Declared in:FBAppCall.h
プロパティ
accessTokenData

Access Token that was returned in this AppCall

@property (nonatomic, readonly) FBAccessTokenData *accessTokenData;
宣言されたアイテム: FBAppCall.h
appLinkData

Data for native app link

@property (nonatomic, readonly) FBAppLinkData *appLinkData;
宣言されたアイテム: FBAppCall.h
dialogData

Data related to a Dialog AppCall

@property (nonatomic, readonly) FBDialogsData *dialogData;
宣言されたアイテム: FBAppCall.h
error

Error that occurred in processing this AppCall

@property (nonatomic, readonly) NSError *error;
宣言されたアイテム: FBAppCall.h
ID

The ID of this FBAppCall instance

@property (nonatomic, readonly) NSString *ID;
宣言されたアイテム: FBAppCall.h
クラスメソッド
appCallFromURL:

Returns an FBAppCall instance from a url, if applicable. Otherwise, returns nil.

パラメーター説明
url

The url.

+ (FBAppCall *) appCallFromURL:(NSURL *)url;
Discussion:

This is typically used for App Link URLs.

宣言されたアイテム: FBAppCall.h
handleDidBecomeActive

Call this method when the application's applicationDidBecomeActive: is invoked. This ensures proper state management of any pending FBAppCalls or pending login flow for the FBSession.activeSession. If any pending FBAppCalls are found, their registered callbacks will be invoked with appropriate state

+ (void) handleDidBecomeActive;
宣言されたアイテム: FBAppCall.h
handleDidBecomeActiveWithSession:

Call this method when the application's applicationDidBecomeActive: is invoked. This ensures proper state management of any pending FBAppCalls or a pending open for the passed in FBSession. If any pending FBAppCalls are found, their registered callbacks will be invoked with appropriate state

パラメーター説明
session

Session that is currently being used. Any pending calls to open will be cancelled. If no session is provided, then the activeSession (if present) is used.

+ (void) handleDidBecomeActiveWithSession:(FBSession *)session;
宣言されたアイテム: FBAppCall.h
handleOpenURL:sourceApplication:

Call this method from the [UIApplicationDelegate application:openURL:sourceApplication:annotation:] method of the AppDelegate for your app. It should be invoked for the proper processing of responses during interaction with the native Facebook app or as part of SSO authorization flow.

パラメーター説明
url

The URL as passed to [UIApplicationDelegate application:openURL:sourceApplication:annotation:].

sourceApplication

The sourceApplication as passed to [UIApplicationDelegate application:openURL:sourceApplication:annotation:].

+ (BOOL)
handleOpenURL: (NSURL *)url
sourceApplication: (NSString *)sourceApplication;
宣言されたアイテム: FBAppCall.h
handleOpenURL:sourceApplication:fallbackHandler:

Call this method from the [UIApplicationDelegate application:openURL:sourceApplication:annotation:] method of the AppDelegate for your app. It should be invoked for the proper processing of responses during interaction with the native Facebook app or as part of SSO authorization flow.

パラメーター説明
url

The URL as passed to [UIApplicationDelegate application:openURL:sourceApplication:annotation:].

sourceApplication

The sourceApplication as passed to [UIApplicationDelegate application:openURL:sourceApplication:annotation:].

handler

Optional handler that gives the app the opportunity to do some further processing on urls that the SDK could not completely process. A fallback handler is not a requirement for such a url to be considered handled. The fallback handler, if specified, is only ever called sychronously, before the method returns.

+ (BOOL)
handleOpenURL: (NSURL *)url
sourceApplication: (NSString *)sourceApplication
fallbackHandler: (FBAppCallHandler)handler;
宣言されたアイテム: FBAppCall.h
handleOpenURL:sourceApplication:withSession:

Call this method from the [UIApplicationDelegate application:openURL:sourceApplication:annotation:] method of the AppDelegate for your app. It should be invoked for the proper processing of responses during interaction with the native Facebook app or as part of SSO authorization flow.

パラメーター説明
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

+ (BOOL)
handleOpenURL: (NSURL *)url
sourceApplication: (NSString *)sourceApplication
withSession: (FBSession *)session;
宣言されたアイテム: FBAppCall.h
handleOpenURL:sourceApplication:withSession:fallbackHandler:

Call this method from the [UIApplicationDelegate application:openURL:sourceApplication:annotation:] method of the AppDelegate for your app. It should be invoked for the proper processing of responses during interaction with the native Facebook app or as part of SSO authorization flow.

パラメーター説明
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 that gives the app the opportunity to do some further processing on urls that the SDK could not completely process. A fallback handler is not a requirement for such a url to be considered handled. The fallback handler, if specified, is only ever called sychronously, before the method returns.

+ (BOOL)
handleOpenURL: (NSURL *)url
sourceApplication: (NSString *)sourceApplication
withSession: (FBSession *)session
fallbackHandler: (FBAppCallHandler)handler;
宣言されたアイテム: FBAppCall.h
openDeferredAppLink:

Call this method from the main thread to fetch deferred applink data. This may require a network round trip. If successful, [+UIApplication openURL:] is invoked with the link data. Otherwise, the fallbackHandler will be dispatched to the main thread.

パラメーター説明
fallbackHandler

The handler to be invoked if applink data could not be opened.

+ (void) openDeferredAppLink:(FBAppLinkFallbackHandler)fallbackHandler;
Discussion:

The fallbackHandler may contain an NSError instance to capture any errors. In the common case where there simply was no app link data, the NSError instance will be nil.

This method should only be called from a location that occurs after any launching URL has been processed (e.g., you should call this method from your application delegate's applicationDidBecomeActive:) to avoid duplicate invocations of openURL:.

If you must call this from the delegate's didFinishLaunchingWithOptions: you should only do so if the application is not being launched by a URL. For example,

if (launchOptions[UIApplicationLaunchOptionsURLKey] == nil) { [FBAppCall openDeferredAppLink:^(NSError *error) { // .... } }

宣言されたアイテム: FBAppCall.h
インスタンスメソッド
isEqualToAppCall:

Compares the receiving FBAppCall to the passed in FBAppCall

パラメーター説明
appCall

The other FBAppCall to compare to.

- (BOOL) isEqualToAppCall:(FBAppCall *)appCall;
宣言されたアイテム: FBAppCall.h
Typedefs
FBAppCallHandler

A block that is passed to performAppCall to register for a callback with the results of that AppCall

typedef void (^FBAppCallHandler)(
FBAppCall *call);
Discussion:

Pass a block of this type when calling performAppCall. This will be called on the UI thread, once the AppCall completes.

宣言されたアイテム: FBAppCall.h
FBAppLinkFallbackHandler

See +openDeferredAppLink.

typedef void (^FBAppLinkFallbackHandler)(
NSError *error);
宣言されたアイテム: FBAppCall.h