FBSettings
Esta classe não está mais disponível na versão mais recente do SDK.
Há uma versão mais recente desta classe disponível. Confira. a versão mais recente.

Allows configuration of SDK behavior.

Inherits from:NSObject
Declared in:FBSettings.h
Métodos de classe
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.")));
Declarado em: FBSettings.h
clientToken

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

+ (NSString *) clientToken;
Declarado em: 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;
Declarado em: 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;
Declarado em: 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;
Declarado em: FBSettings.h
disableBetaFeature:

Disables a beta feature.

ParâmetroDescrição
betaFeature

The beta feature to disable.

+ (void) disableBetaFeature:(FBBetaFeatures)betaFeature;
Declarado em: 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.

ParâmetroDescrição
betaFeature

The beta feature to enable.

+ (void) enableBetaFeature:(FBBetaFeatures)betaFeature;
Declarado em: 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.

ParâmetroDescrição
betaFeatures

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

+ (void) enableBetaFeatures:(NSUInteger)betaFeatures;
Declarado em: FBSettings.h
enablePlatformCompatibility:

Configures the SDK to use the legacy platform.

ParâmetroDescrição
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.

Declarado em: FBSettings.h
facebookDomainPart

Get the Facebook domain part

+ (NSString *) facebookDomainPart;
Declarado em: FBSettings.h
isBetaFeatureEnabled:

Determines whether a beta feature is enabled or not.

ParâmetroDescrição
betaFeature

The beta feature to check.

+ (BOOL) isBetaFeatureEnabled:(FBBetaFeatures)betaFeature;
Declarado em: FBSettings.h
isPlatformCompatibilityEnabled

Returns YES if the legacy Graph API mode is enabled

+ (BOOL) isPlatformCompatibilityEnabled;
Declarado em: 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;
Declarado em: FBSettings.h
loggingBehavior

Retrieve the current Facebook SDK logging behavior.

+ (NSSet *) loggingBehavior;
Declarado em: FBSettings.h
resourceBundleName

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

+ (NSString *) resourceBundleName;
Declarado em: FBSettings.h
sdkVersion

Retrieve the current iOS SDK version.

+ (NSString *) sdkVersion;
Declarado em: FBSettings.h
setAppVersion:

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

ParâmetroDescrição
appVersion

Deprecated

+ (void) setAppVersion:(NSString *)appVersion __attribute__((deprecated("App Events favors use of bundle identifiers for version identification.")));
Declarado em: 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.

ParâmetroDescrição
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;
Declarado em: 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)

ParâmetroDescrição
appID

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

+ (void) setDefaultAppID:(NSString *)appID;
Declarado em: 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

ParâmetroDescrição
displayName

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

+ (void) setDefaultDisplayName:(NSString *)displayName;
Declarado em: FBSettings.h
setDefaultUrlSchemeSuffix:

Set the default url scheme suffix used by the SDK.

ParâmetroDescrição
urlSchemeSuffix

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

+ (void) setDefaultUrlSchemeSuffix:(NSString *)urlSchemeSuffix;
Declarado em: FBSettings.h
setFacebookDomainPart:

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

ParâmetroDescrição
facebookDomainPart

The domain part to be inserted into facebook.com

+ (void) setFacebookDomainPart:(NSString *)facebookDomainPart;
Declarado em: 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.

ParâmetroDescrição
limitEventAndDataUsage

The desired value.

+ (void) setLimitEventAndDataUsage:(BOOL)limitEventAndDataUsage;
Declarado em: 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:].

ParâmetroDescrição
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;
Declarado em: FBSettings.h
setResourceBundleName:

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

ParâmetroDescrição
bundleName

The name of the bundle (MyFBBundle).

+ (void) setResourceBundleName:(NSString *)bundleName;
Declarado em: FBSettings.h
Constantes
FBLoggingBehaviorAccessTokens
FBSDK_EXTER N NSString *const FBLoggingBehaviorAccessTokens;
Discussion:

Include access token in logging.

Declarado em: FBSettings.h
FBLoggingBehaviorAppEvents
FBSDK_EXTER N NSString *const FBLoggingBehaviorAppEvents;
Discussion:

Log FBAppEvents interactions

Declarado em: FBSettings.h
FBLoggingBehaviorCacheErrors
FBSDK_EXTER N NSString *const FBLoggingBehaviorCacheErrors;
Discussion:

Log cache errors.

Declarado em: 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.

Declarado em: FBSettings.h
FBLoggingBehaviorFBRequests
FBSDK_EXTER N NSString *const FBLoggingBehaviorFBRequests;
Discussion:

Log requests from FBRequest* classes

Declarado em: FBSettings.h
FBLoggingBehaviorFBURLConnections
FBSDK_EXTER N NSString *const FBLoggingBehaviorFBURLConnections;
Discussion:

Log requests from FBURLConnection* classes

Declarado em: FBSettings.h
FBLoggingBehaviorInformational
FBSDK_EXTER N NSString *const FBLoggingBehaviorInformational;
Discussion:

Log Informational occurrences

Declarado em: FBSettings.h
FBLoggingBehaviorPerformanceCharacteristics
FBSDK_EXTER N NSString *const FBLoggingBehaviorPerformanceCharacteristics;
Discussion:

Log performance characteristics

Declarado em: FBSettings.h
FBLoggingBehaviorSessionStateTransitions
FBSDK_EXTER N NSString *const FBLoggingBehaviorSessionStateTransitions;
Discussion:

Log session state transitions.

Declarado em: FBSettings.h
FBLoggingBehaviorUIControlErrors
FBSDK_EXTER N NSString *const FBLoggingBehaviorUIControlErrors;
Discussion:

Log errors from SDK UI controls

Declarado em: FBSettings.h
Typedefs
NS_ENUM

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,
};
ConstanteDescrição
FBBetaFeaturesNone

Default value indicating no beta features

Declarado em: FBSettings.h
NS_ENUM

Indicates if this app should be restricted

typedef NS_ENUM(NSUInteger, FBRestrictedTreatment) {
FBRestrictedTreatmentNO = 0,
FBRestrictedTreatmentYES = 1
};
ConstanteDescrição
FBRestrictedTreatmentNO

The default treatment indicating the app is not restricted.

FBRestrictedTreatmentYES

Indicates the app is restricted.

Declarado em: FBSettings.h