FBSettings
最新版的 SDK 已不支持此类。
这个类有新版本。查看 最新版本。

Allows configuration of SDK behavior.

Inherits from:NSObject
Declared in:FBSettings.h
类方法
appVersion

This method is deprecated -- App Events favors using bundle identifiers to this.

+ (NSString *) appVersion __attribute__((deprecated("App Events favors use of bundle identifiers for version identification.")));
声明语言: FBSettings.h
clientToken

Retrieve the Client Token that has been set via [FBSettings setClientToken]

+ (NSString *) clientToken;
声明语言: FBSettings.h
defaultAppID

Get the default Facebook App ID used by the SDK. If not explicitly set, the default will be read from the application's plist. The SDK allows the appID to be overridden per instance in certain cases (e.g. per instance of FBSession)

+ (NSString *) defaultAppID;
声明语言: FBSettings.h
defaultDisplayName

Get the default Facebook Display Name used by the SDK. If not explicitly set, the default will be read from the application's plist.

+ (NSString *) defaultDisplayName;
声明语言: FBSettings.h
defaultUrlSchemeSuffix

Get the default url scheme suffix used for sessions. If not explicitly set, the default will be read from the application's plist value for 'FacebookUrlSchemeSuffix'.

+ (NSString *) defaultUrlSchemeSuffix;
声明语言: FBSettings.h
disableBetaFeature:

Disables a beta feature.

参数描述
betaFeature

The beta feature to disable.

+ (void) disableBetaFeature:(FBBetaFeatures)betaFeature;
声明语言: FBSettings.h
enableBetaFeature:

Enables a beta feature. Beta features are for evaluation only, and are therefore only enabled for debug builds. Beta features should not be enabled in release builds.

参数描述
betaFeature

The beta feature to enable.

+ (void) enableBetaFeature:(FBBetaFeatures)betaFeature;
声明语言: FBSettings.h
enableBetaFeatures:

Enables the specified beta features. Beta features are for evaluation only, and are therefore only enabled for debug builds. Beta features should not be enabled in release builds.

参数描述
betaFeatures

The beta features to enable (expects a bitwise OR of FBBetaFeatures)

+ (void) enableBetaFeatures:(NSUInteger)betaFeatures;
声明语言: FBSettings.h
enablePlatformCompatibility:

Configures the SDK to use the legacy platform.

参数描述
enable

Indicates whether to use the legacy mode

+ (void) enablePlatformCompatibility:(BOOL)enable;
Discussion:

Setting this flag has several effects: - FBRequests will target v1.0 of the Graph API. - Login will use the prior behavior without abilities to decline permission. - Specific new features such as FBLikeButton that require the current platform will not work.

声明语言: FBSettings.h
facebookDomainPart

Get the Facebook domain part

+ (NSString *) facebookDomainPart;
声明语言: FBSettings.h
isBetaFeatureEnabled:

Determines whether a beta feature is enabled or not.

参数描述
betaFeature

The beta feature to check.

+ (BOOL) isBetaFeatureEnabled:(FBBetaFeatures)betaFeature;
声明语言: FBSettings.h
isPlatformCompatibilityEnabled

Returns YES if the legacy Graph API mode is enabled

+ (BOOL) isPlatformCompatibilityEnabled;
声明语言: FBSettings.h
limitEventAndDataUsage

Gets whether data such as that generated through FBAppEvents and sent to Facebook should be restricted from being used for other than analytics and conversions. Defaults to NO. This value is stored on the device and persists across app launches.

+ (BOOL) limitEventAndDataUsage;
声明语言: FBSettings.h
loggingBehavior

Retrieve the current Facebook SDK logging behavior.

+ (NSSet *) loggingBehavior;
声明语言: FBSettings.h
resourceBundleName

Get the name of the bundle to override the SDK images and text

+ (NSString *) resourceBundleName;
声明语言: FBSettings.h
sdkVersion

Retrieve the current iOS SDK version.

+ (NSString *) sdkVersion;
声明语言: FBSettings.h
setAppVersion:

This method is deprecated -- App Events favors using bundle identifiers to this.

+ (void) setAppVersion:(NSString *)appVersion __attribute__((deprecated("App Events favors use of bundle identifiers for version identification.")));
声明语言: FBSettings.h
setClientToken:

Sets the Client Token for the Facebook App. This is needed for certain API calls when made anonymously, without a user-based Session.

参数描述
clientToken

The Facebook App's "client token", which, for a given appid can be found in the Security section of the Advanced tab of the Facebook App settings found at https://developers.facebook.com/apps/[your-app-id]

+ (void) setClientToken:(NSString *)clientToken;
声明语言: FBSettings.h
setDefaultAppID:

Set the default Facebook App ID to use for sessions. The SDK allows the appID to be overridden per instance in certain cases (e.g. per instance of FBSession)

参数描述
appID

The default Facebook App ID to be used by the SDK.

+ (void) setDefaultAppID:(NSString *)appID;
声明语言: FBSettings.h
setDefaultDisplayName:

Set the default Facebook Display Name to be used by the SDK. This should match the Display Name that has been set for the app with the corresponding Facebook App ID, in the Facebook App Dashboard

参数描述
displayName

The default Facebook Display Name to be used by the SDK.

+ (void) setDefaultDisplayName:(NSString *)displayName;
声明语言: FBSettings.h
setDefaultUrlSchemeSuffix:

Set the default url scheme suffix used by the SDK.

参数描述
urlSchemeSuffix

The default url scheme suffix to be used by the SDK.

+ (void) setDefaultUrlSchemeSuffix:(NSString *)urlSchemeSuffix;
声明语言: FBSettings.h
setFacebookDomainPart:

Set the subpart of the facebook domain (e.g. @"beta") so that requests will be sent to graph.beta.facebook.com

参数描述
facebookDomainPart

The domain part to be inserted into facebook.com

+ (void) setFacebookDomainPart:(NSString *)facebookDomainPart;
声明语言: FBSettings.h
setLimitEventAndDataUsage:

Sets whether data such as that generated through FBAppEvents and sent to Facebook should be restricted from being used for other than analytics and conversions. Defaults to NO. This value is stored on the device and persists across app launches.

参数描述
limitEventAndDataUsage

The desired value.

+ (void) setLimitEventAndDataUsage:(BOOL)limitEventAndDataUsage;
声明语言: FBSettings.h
setLoggingBehavior:

Set the current Facebook SDK logging behavior. This should consist of strings defined as constants with FBLogBehavior*, and can be constructed with, e.g., [NSSet initWithObjects:].

参数描述
loggingBehavior

A set of strings indicating what information should be logged. If nil is provided, the logging behavior is reset to the default set of enabled behaviors. Set in an empty set in order to disable all logging.

+ (void) setLoggingBehavior:(NSSet *)loggingBehavior;
声明语言: FBSettings.h
setResourceBundleName:

Set the bundle name from the SDK will try and load overrides of images and text

参数描述
bundleName

The name of the bundle (MyFBBundle).

+ (void) setResourceBundleName:(NSString *)bundleName;
声明语言: FBSettings.h
常量
FBLoggingBehaviorAccessTokens
FBSDK_EXTER N NSString *const FBLoggingBehaviorAccessTokens;
Discussion:

Include access token in logging.

声明语言: FBSettings.h
FBLoggingBehaviorAppEvents
FBSDK_EXTER N NSString *const FBLoggingBehaviorAppEvents;
Discussion:

Log FBAppEvents interactions

声明语言: FBSettings.h
FBLoggingBehaviorCacheErrors
FBSDK_EXTER N NSString *const FBLoggingBehaviorCacheErrors;
Discussion:

Log cache errors.

声明语言: FBSettings.h
FBLoggingBehaviorDeveloperErrors
FBSDK_EXTER N NSString *const FBLoggingBehaviorDeveloperErrors;
Discussion:

Log errors likely to be preventable by the developer. This is in the default set of enabled logging behaviors.

声明语言: FBSettings.h
FBLoggingBehaviorFBRequests
FBSDK_EXTER N NSString *const FBLoggingBehaviorFBRequests;
Discussion:

Log requests from FBRequest* classes

声明语言: FBSettings.h
FBLoggingBehaviorFBURLConnections
FBSDK_EXTER N NSString *const FBLoggingBehaviorFBURLConnections;
Discussion:

Log requests from FBURLConnection* classes

声明语言: FBSettings.h
FBLoggingBehaviorInformational
FBSDK_EXTER N NSString *const FBLoggingBehaviorInformational;
Discussion:

Log Informational occurrences

声明语言: FBSettings.h
FBLoggingBehaviorPerformanceCharacteristics
FBSDK_EXTER N NSString *const FBLoggingBehaviorPerformanceCharacteristics;
Discussion:

Log performance characteristics

声明语言: FBSettings.h
FBLoggingBehaviorSessionStateTransitions
FBSDK_EXTER N NSString *const FBLoggingBehaviorSessionStateTransitions;
Discussion:

Log session state transitions.

声明语言: FBSettings.h
Typedef
NS_ENUM

Indicates if this app should be restricted

typedef NS_ENUM(NSUInteger, FBRestrictedTreatment) {
FBRestrictedTreatmentNO = 0,
FBRestrictedTreatmentYES = 1
};
常数描述
FBRestrictedTreatmentNO

The default treatment indicating the app is not restricted.

FBRestrictedTreatmentYES

Indicates the app is restricted.

声明语言: FBSettings.h
NSUInteger

A list of beta features that can be enabled for the SDK. Beta features are for evaluation only, and are therefore only enabled for DEBUG builds. Beta features should not be enabled in release builds.

typedef NS_ENUM(NSUInteger, FBBetaFeatures) {
FBBetaFeaturesNone = 0, #if defined(DEBUG) || defined(FB_BUILD_ONLY)
#endif
};
声明语言: FBSettings.h