iOS SDK Version

Classes

The following classes are available globally.
  • Represents an immutable access token for using Facebook services.
    See more

    Declaration

    Objective-C
    @interfaceFBSDKAccessToken:NSObject<FBSDKCopying,NSSecureCoding>
    Swift
    classAccessToken:NSObject,Copying,NSSecureCoding
  • The FBSDKApplicationDelegate is designed to post process the results from Facebook Login or Facebook Dialogs (or any action that requires switching over to the native Facebook app or Safari).
    The methods in this class are designed to mirror those in UIApplicationDelegate, and you should call them in the respective methods in your AppDelegate implementation.
    See more

    Declaration

    Objective-C
    @interfaceFBSDKApplicationDelegate:NSObject
    Swift
    classApplicationDelegate:NSObject
  • Represent an AuthenticationToken used for a login attempt
    See more

    Declaration

    Objective-C
    @interfaceFBSDKAuthenticationToken:NSObject<FBSDKCopying,NSSecureCoding>
    Swift
    classAuthenticationToken:NSObject,Copying,NSSecureCoding
  • Undocumented
    See more

    Declaration

    Objective-C
    @interfaceFBSDKAuthenticationTokenClaims:NSObject/// A unique identifier for the token.@property(nonatomic,readonly,strong)NSString*jti;/// Issuer Identifier for the Issuer of the response.@property(nonatomic,readonly,strong)NSString*iss;/// Audience(s) that this ID Token is intended for.@property(nonatomic,readonly,strong)NSString*aud;/// String value used to associate a Client session with an ID Token, and to mitigate replay attacks.@property(nonatomic,readonly,strong)NSString*nonce;/// Expiration time on or after which the ID Token MUST NOT be accepted for processing.@property(nonatomic,readonly,assign)NSTimeIntervalexp;/// Time at which the JWT was issued.@property(nonatomic,readonly,assign)NSTimeIntervaliat;/// Subject - Identifier for the End-User at the Issuer.@property(nonatomic,readonly,strong)NSString*sub;/// End-User's full name in displayable form including all name parts.@property(nullable,nonatomic,readonly,strong)NSString*name;/// End-User's given name in displayable form@property(nullable,nonatomic,readonly,strong)NSString*givenName;/// End-User's middle name in displayable form@property(nullable,nonatomic,readonly,strong)NSString*middleName;/// End-User's family name in displayable form@property(nullable,nonatomic,readonly,strong)NSString*familyName;/** End-User's preferred e-mail address. IMPORTANT: This field will only be populated if your user has granted your application the 'email' permission. */@property(nullable,nonatomic,readonly,strong)NSString*email;/// URL of the End-User's profile picture.@property(nullable,nonatomic,readonly,strong)NSString*picture;/** End-User's friends. IMPORTANT: This field will only be populated if your user has granted your application the 'user_friends' permission. */@property(nullable,nonatomic,readonly,strong)NSArray<NSString*>*userFriends;/// End-User's birthday@property(nullable,nonatomic,readonly,strong)NSString*userBirthday;/// End-User's age range@property(nullable,nonatomic,readonly,strong)NSDictionary<NSString*,NSNumber*>*userAgeRange;/// End-User's hometown@property(nullable,nonatomic,readonly,strong)NSDictionary<NSString*,NSString*>*userHometown;/// End-User's location@property(nullable,nonatomic,readonly,strong)NSDictionary<NSString*,NSString*>*userLocation;/// End-User's gender@property(nullable,nonatomic,readonly,strong)NSString*userGender;/// End-User's link@property(nullable,nonatomic,readonly,strong)NSString*userLink;-(instancetype)initNS_UNAVAILABLE;+(instancetype)newNS_UNAVAILABLE;@end
    Swift
    classFBSDKAuthenticationTokenClaims:NSObject
  • Internal Type exposed to facilitate transition to Swift. API Subject to change or removal without warning. Do not use.
    Warning
    UNSAFE - DO NOT USE
    See more

    Declaration

    Objective-C
    @interfaceFBSDKBridgeAPI:NSObject
    Swift
    classBridgeAPI:NSObject
  • Internal Type exposed to facilitate transition to Swift. API Subject to change or removal without warning. Do not use.
    Warning
    UNSAFE - DO NOT USE
    See more

    Declaration

    Objective-C
    @interfaceFBSDKBridgeAPIRequest:NSObject<FBSDKCopying,FBSDKBridgeAPIRequestProtocol>
    Swift
    classBridgeAPIRequest:NSObject,Copying,FBSDKBridgeAPIRequestProtocol
  • Internal Type exposed to facilitate transition to Swift. API Subject to change or removal without warning. Do not use.
    Warning
    UNSAFE - DO NOT USE
    See more

    Declaration

    Objective-C
    @interfaceFBSDKBridgeAPIResponse:NSObject<FBSDKCopying>
    Swift
    classBridgeAPIResponse:NSObject,Copying
  • A base class for common SDK buttons.

    Declaration

    Objective-C
    @interfaceFBSDKButton:FBSDKImpressionTrackingButton
    Swift
    classFBButton:ImpressionTrackingButton
  • Internal Type exposed to facilitate transition to Swift. API Subject to change or removal without warning. Do not use.
    Warning
    UNSAFE - DO NOT USE

    Declaration

    Objective-C
    @interfaceFBSDKImpressionTrackingButton:UIButton
    Swift
    classImpressionTrackingButton:UIButton
  • Undocumented
    See more

    Declaration

    Objective-C
    @interfaceFBSDKLocation:NSObject<FBSDKCopying,NSSecureCoding>/** Location id */@property(nonatomic,readonly,strong)NSString*id;/** Location name */@property(nonatomic,readonly,strong)NSString*name;-(instancetype)initNS_UNAVAILABLE;+(instancetype)newNS_UNAVAILABLE;/** Returns a Location object from a dinctionary containing valid location information. @param dictionary The dictionary containing raw location Valid location will consist of "id" and "name" strings. */+(nullableinstancetype)locationFromDictionary:(NSDictionary<NSString*,NSString*>*)dictionary;@end
    Swift
    classLocation:NSObject,Copying,NSSecureCoding
  • Undocumented

    Declaration

    Objective-C
    @interfaceFBSDKMeasurementEvent:NSObject@end
    Swift
    classMeasurementEvent:NSObject
  • Represents an immutable Facebook profile
    This class provides a global “currentProfile” instance to more easily add social context to your application. When the profile changes, a notification is posted so that you can update relevant parts of your UI and is persisted to NSUserDefaults.
    Typically, you will want to call enableUpdatesOnAccessTokenChange:YES so that it automatically observes changes to the [FBSDKAccessToken currentAccessToken].
    You can use this class to build your own FBSDKProfilePictureView or in place of typical requests to “/me”.
    See more

    Declaration

    Objective-C
    @interfaceFBSDKProfile:NSObject<NSCopying,NSSecureCoding>
    Swift
    classProfile:NSObject,NSCopying,NSSecureCoding
  • A view to display a profile picture.
    See more

    Declaration

    Objective-C
    @interfaceFBSDKProfilePictureView:UIView
    Swift
    classFBProfilePictureView:UIView
  • Undocumented
    See more

    Declaration

    Objective-C
    @interfaceFBSDKSettings:NSObject-(instancetype)initNS_UNAVAILABLE;+(instancetype)newNS_UNAVAILABLE;/** Retrieve the current iOS SDK version. */@property(class,nonatomic,copy,readonly)NSString*sdkVersion;/** Retrieve the current default Graph API version. */@property(class,nonatomic,copy,readonly)NSString*defaultGraphAPIVersion;/** The quality of JPEG images sent to Facebook from the SDK, expressed as a value from 0.0 to 1.0. If not explicitly set, the default is 0.9. @see [UIImageJPEGRepresentation](https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIKitFunctionReference/#//apple_ref/c/func/UIImageJPEGRepresentation) */@property(class,nonatomic,assign)CGFloatJPEGCompressionQualityNS_SWIFT_NAME(jpegCompressionQuality);/** Controls the auto logging of basic app events, such as activateApp and deactivateApp. If not explicitly set, the default is true */@property(class,nonatomic,assign,getter=isAutoLogAppEventsEnabled)BOOLautoLogAppEventsEnabled;/** Controls the fb_codeless_debug logging event If not explicitly set, the default is true */@property(class,nonatomic,assign,getter=isCodelessDebugLogEnabled)BOOLcodelessDebugLogEnabled;/** Controls the access to IDFA If not explicitly set, the default is true */@property(class,nonatomic,assign,getter=isAdvertiserIDCollectionEnabled)BOOLadvertiserIDCollectionEnabled;/** Controls the SKAdNetwork report If not explicitly set, the default is true */@property(class,nonatomic,assign,getter=isSKAdNetworkReportEnabled)BOOLSKAdNetworkReportEnabled;/** Whether data such as that generated through FBSDKAppEvents 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. */@property(class,nonatomic,assign,getter=shouldLimitEventAndDataUsage)BOOLlimitEventAndDataUsage;/** Whether in memory cached values should be used for expensive metadata fields, such as carrier and advertiser ID, that are fetched on many applicationDidBecomeActive notifications. Defaults to NO. This value is stored on the device and persists across app launches. */@property(class,nonatomic,assign,getter=shouldUseCachedValuesForExpensiveMetadata)BOOLshouldUseCachedValuesForExpensiveMetadata;/** A convenient way to toggle error recovery for all FBSDKGraphRequest instances created after this is set. */@property(class,nonatomic,assign,getter=isGraphErrorRecoveryEnabled)BOOLgraphErrorRecoveryEnabled;/** The Facebook App ID used by the SDK. If not explicitly set, the default will be read from the application's plist (FacebookAppID). */@property(class,nonatomic,copy,nullable)NSString*appID;/** The default url scheme suffix used for sessions. If not explicitly set, the default will be read from the application's plist (FacebookUrlSchemeSuffix). */@property(class,nonatomic,copy,nullable)NSString*appURLSchemeSuffix;/** The Client Token that has been set via [FBSDKSettings setClientToken]. This is needed for certain API calls when made anonymously, without a user-based access token. 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]> If not explicitly set, the default will be read from the application's plist (FacebookClientToken). */@property(class,nonatomic,copy,nullable)NSString*clientToken;/** The Facebook Display Name 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. If not explicitly set, the default will be read from the application's plist (FacebookDisplayName). */@property(class,nonatomic,copy,nullable)NSString*displayName;/** The Facebook domain part. This can be used to change the Facebook domain (e.g. @"beta") so that requests will be sent to `graph.beta.facebook.com` If not explicitly set, the default will be read from the application's plist (FacebookDomainPart). */@property(class,nonatomic,copy,nullable)NSString*facebookDomainPart;/** The current Facebook SDK logging behavior. This should consist of strings defined as constants with FBSDKLoggingBehavior*. This should consist a set of strings indicating what information should be logged defined as constants with FBSDKLoggingBehavior*. Set to an empty set in order to disable all logging. You can also define this via an array in your app plist with key "FacebookLoggingBehavior" or add and remove individual values via enableLoggingBehavior: or disableLogginBehavior: The default is a set consisting of FBSDKLoggingBehaviorDeveloperErrors */@property(class,nonatomic,copy)NSSet<FBSDKLoggingBehavior>*loggingBehaviors;/** Overrides the default Graph API version to use with `FBSDKGraphRequests`. This overrides `FBSDK_TARGET_PLATFORM_VERSION`. The string should be of the form `@"v2.7"`. Defaults to `FBSDK_TARGET_PLATFORM_VERSION`. */@property(class,nonatomic,copy,null_resettable)NSString*graphAPIVersion;/** The value of the flag advertiser_tracking_enabled that controls the advertiser tracking status of the data sent to Facebook If not explicitly set in iOS14 or above, the default is false in iOS14 or above. */+(BOOL)isAdvertiserTrackingEnabled;/** Set the advertiser_tracking_enabled flag. It only works in iOS14 and above. @param advertiserTrackingEnabled the value of the flag @return Whether the the value is set successfully. It will always return NO in iOS 13 and below. */+(BOOL)setAdvertiserTrackingEnabled:(BOOL)advertiserTrackingEnabled;/** Set the data processing options. @param options list of options */+(void)setDataProcessingOptions:(nullableNSArray<NSString*>*)options;/** Set the data processing options. @param options list of the options @param country code of the country @param state code of the state */+(void)setDataProcessingOptions:(nullableNSArray<NSString*>*)optionscountry:(int)countrystate:(int)state;/** Enable a particular Facebook SDK logging behavior. @param loggingBehavior The LoggingBehavior to enable. This should be a string defined as a constant with FBSDKLoggingBehavior*. */+(void)enableLoggingBehavior:(FBSDKLoggingBehavior)loggingBehavior;/** Disable a particular Facebook SDK logging behavior. @param loggingBehavior The LoggingBehavior to disable. This should be a string defined as a constant with FBSDKLoggingBehavior*. */+(void)disableLoggingBehavior:(FBSDKLoggingBehavior)loggingBehavior;@end
    Swift
    classSettings:NSObject
  • Provides a set of utilities for working with NSURLs, such as parsing of query parameters and handling for App Link requests.
    See more

    Declaration

    Objective-C
    @interfaceFBSDKURL:NSObject
    Swift
    classAppLinkURL:NSObject
  • Undocumented
    See more

    Declaration

    Objective-C
    @interfaceFBSDKUserAgeRange:NSObject<FBSDKCopying,NSSecureCoding>/** The user's minimun age, nil if unspecified */@property(nullable,nonatomic,readonly,strong)NSNumber*min;/** The user's maximun age, nil if unspecified */@property(nullable,nonatomic,readonly,strong)NSNumber*max;-(instancetype)initNS_UNAVAILABLE;+(instancetype)newNS_UNAVAILABLE;/** Returns a UserAgeRange object from a dinctionary containing valid user age range. @param dictionary The dictionary containing raw user age range Valid user age range will consist of "min" and/or "max" values that are positive integers, where "min" is smaller than or equal to "max". */+(nullableinstancetype)ageRangeFromDictionary:(NSDictionary<NSString*,NSNumber*>*)dictionary;@end
    Swift
    classUserAgeRange:NSObject,Copying,NSSecureCoding
  • Class to contain common utility methods.
    See more

    Declaration

    Objective-C
    @interfaceFBSDKUtility:NSObject
    Swift
    classUtility:NSObject
  • Internal Type exposed to facilitate transition to Swift. API Subject to change or removal without warning. Do not use.
    Warning
    UNSAFE - DO NOT USE
    See more

    Declaration

    Objective-C
    @interfaceFBSDKWebDialog:NSObject
    Swift
    classWebDialog:NSObject
  • A model for creating an app group.
    See more

    Declaration

    Objective-C
    @interfaceFBSDKAppGroupContent:NSObject<FBSDKCopying,NSSecureCoding>
    Swift
    classAppGroupContent:NSObject,Copying,NSSecureCoding
  • A model for app invite.
    See more

    Declaration

    Objective-C
    @interfaceFBSDKAppInviteContent:NSObject<FBSDKCopying,FBSDKSharingValidation,NSSecureCoding>
    Swift
    classAppInviteContent:NSObject,Copying,SharingValidation,NSSecureCoding
  • A container of arguments for a camera effect. An argument is a NSString identified by a NSString key.
    See more

    Declaration

    Objective-C
    @interfaceFBSDKCameraEffectArguments:NSObject<FBSDKCopying,NSSecureCoding>
    Swift
    classCameraEffectArguments:NSObject,Copying,NSSecureCoding
  • A container of textures for a camera effect. A texture for a camera effect is an UIImages identified by a NSString key.
    See more

    Declaration

    Objective-C
    @interfaceFBSDKCameraEffectTextures:NSObject<FBSDKCopying,NSSecureCoding>
    Swift
    classCameraEffectTextures:NSObject,Copying,NSSecureCoding
  • A model for a game request.
    See more

    Declaration

    Objective-C
    @interfaceFBSDKGameRequestContent:NSObject<FBSDKCopying,FBSDKSharingValidation,NSSecureCoding>
    Swift
    classGameRequestContent:NSObject,Copying,SharingValidation,NSSecureCoding
  • A dialog for sending game requests.
    See more

    Declaration

    Objective-C
    @interfaceFBSDKGameRequestDialog:NSObject
    Swift
    classGameRequestDialog:NSObject
  • Undocumented
    See more

    Declaration

    Objective-C
    @interfaceFBSDKGameRequestURLProvider:NSObject+(NSURL*_Nullable)createDeepLinkURLWithQueryDictionary:(NSDictionary*_Nonnull)queryDictionary;+(NSString*_Nullable)filtersNameForFilters:(FBSDKGameRequestFilter)filters;+(NSString*_Nullable)actionTypeNameForActionType:(FBSDKGameRequestActionType)actionType;@end
    Swift
    classGameRequestURLProvider:NSObject
  • Represents a single hashtag that can be used with the share dialog.
    See more

    Declaration

    Objective-C
    @interfaceFBSDKHashtag:NSObject<FBSDKCopying,NSSecureCoding>
    Swift
    classHashtag:NSObject,Copying,NSSecureCoding
  • A dialog for sharing content through Messenger.
    SUPPORTED SHARE TYPES
    • FBSDKShareLinkContent
    UNSUPPORTED SHARE TYPES (DEPRECATED AUGUST 2018)
    • FBSDKShareOpenGraphContent
    • FBSDKSharePhotoContent
    • FBSDKShareVideoContent
    • FBSDKShareMessengerOpenGraphMusicTemplateContent
    • FBSDKShareMessengerMediaTemplateContent
    • FBSDKShareMessengerGenericTemplateContent
    • Any other types that are not one of the four supported types listed above
    See more

    Declaration

    Objective-C
    @interfaceFBSDKMessageDialog:NSObject<FBSDKSharingDialog>
    Swift
    classMessageDialog:NSObject,SharingDialog
  • A button to send content through Messenger.
    Tapping the receiver will invoke the FBSDKShareDialog with the attached shareContent. If the dialog cannot be shown, the button will be disable.

    Declaration

    Objective-C
    @interfaceFBSDKSendButton:FBSDKButton<FBSDKSharingButton>
    Swift
    classFBSendButton:FBButton,SharingButton
  • A button to share content.
    Tapping the receiver will invoke the FBSDKShareDialog with the attached shareContent. If the dialog cannot be shown, the button will be disabled.

    Declaration

    Objective-C
    @interfaceFBSDKShareButton:FBSDKButton<FBSDKSharingButton>
    Swift
    classFBShareButton:FBButton,SharingButton
  • A model for content to share with a Facebook camera effect.
    See more

    Declaration

    Objective-C
    @interfaceFBSDKShareCameraEffectContent:NSObject<FBSDKSharingContent,FBSDKSharingScheme>
    Swift
    classShareCameraEffectContent:NSObject,SharingContent,SharingScheme
  • A dialog for sharing content on Facebook.
    See more

    Declaration

    Objective-C
    @interfaceFBSDKShareDialog:NSObject<FBSDKSharingDialog>
    Swift
    classShareDialog:NSObject,SharingDialog
  • A model for status and link content to be shared.
    See more

    Declaration

    Objective-C
    @interfaceFBSDKShareLinkContent:NSObject<FBSDKSharingContent>
    Swift
    classShareLinkContent:NSObject,SharingContent
  • A model for media content (photo or video) to be shared.
    See more

    Declaration

    Objective-C
    @interfaceFBSDKShareMediaContent:NSObject<FBSDKSharingContent>
    Swift
    classShareMediaContent:NSObject,SharingContent
  • A photo for sharing.
    See more

    Declaration

    Objective-C
    @interfaceFBSDKSharePhoto:NSObject<NSSecureCoding,FBSDKCopying,FBSDKShareMedia,FBSDKSharingValidation>
    Swift
    classSharePhoto:NSObject,NSSecureCoding,Copying,ShareMedia,SharingValidation
  • A model for photo content to be shared.
    See more

    Declaration

    Objective-C
    @interfaceFBSDKSharePhotoContent:NSObject<FBSDKSharingContent>
    Swift
    classSharePhotoContent:NSObject,SharingContent
  • A video for sharing.
    See more

    Declaration

    Objective-C
    @interfaceFBSDKShareVideo:NSObject<NSSecureCoding,FBSDKCopying,FBSDKShareMedia,FBSDKSharingValidation>
    Swift
    classShareVideo:NSObject,NSSecureCoding,Copying,ShareMedia,SharingValidation
  • A model for video content to be shared.
    See more

    Declaration

    Objective-C
    @interfaceFBSDKShareVideoContent:NSObject<FBSDKSharingContent>
    Swift
    classShareVideoContent:NSObject,SharingContent