Facebook SDK for Android Reference  (v3.23.1)
This is an old version of the SDK. Check out the latest version.
Newer Versions4.16.14.16.04.15.04.144.134.12.04.114.104.94.84.74.54.44.34.24.0.14.0
Previous Versions3.233.223.213.203.193.183.173.163.153.143.83.73.63.5.23.5.13.53.0
Classes
NameDescription
AccessTokenThis class represents an access token returned by the Facebook Login service, along with associated metadata such as its expiration date and permissions
AccessTokenSourceIndicates where a Facebook access token was obtained from
AppEventsConstantsPredefined event and parameter names for logging events common to many apps
AppEventsLogger The AppEventsLogger class allows the developer to log various types of events back to Facebook
AppEventsLogger.FlushBehaviorControls when an AppEventsLogger sends log events to the server
AppLinkDataClass to encapsulate an app link, and provide methods for constructing the data from various sources
AsyncFacebookRunnerA sample implementation of asynchronous API requests
BoltsMeasurementEventListener
DialogErrorEncapsulation of Dialog Error
FacebookTHIS CLASS SHOULD BE CONSIDERED DEPRECATED
FacebookAppLinkResolverProvides an implementation for the AppLinkResolver interface that uses the Facebook App Link index to solve App Links, given a Url
FacebookBroadcastReceiverThis class implements a simple BroadcastReceiver designed to listen for broadcast notifications from the Facebook app
FacebookDialog
FacebookDialog.BuilderProvides a base class for various FacebookDialog builders
FacebookDialog.MessageDialogBuilderProvides a builder which can construct a FacebookDialog instance suitable for presenting the native Message dialog
FacebookDialog.MessageDialogFeatureDefines a set of features that may be supported by the native Message dialog exposed by the Facebook Messenger application
FacebookDialog.OpenGraphActionDialogBuilderProvides a builder which can construct a FacebookDialog instance suitable for presenting the native Open Graph action publish dialog
FacebookDialog.OpenGraphActionDialogFeatureDefines a set of features that may be supported by the native Open Graph dialogs exposed by the Facebook application
FacebookDialog.OpenGraphMessageDialogBuilderProvides a builder which can construct a FacebookDialog instance suitable for presenting the native Open Graph action message dialog
FacebookDialog.OpenGraphMessageDialogFeatureDefines a set of features that may be supported by the native Open Graph Message dialogs exposed by the Facebook application
FacebookDialog.PendingCallEncapsulates information about a call being made to the Facebook application for Android
FacebookDialog.PhotoMessageDialogBuilderProvides a builder which can construct a FacebookDialog instance suitable for presenting the native Message dialog for sharing photos
FacebookDialog.PhotoShareDialogBuilderProvides a builder which can construct a FacebookDialog instance suitable for presenting the native Share dialog for sharing photos
FacebookDialog.ShareDialogBuilderProvides a builder which can construct a FacebookDialog instance suitable for presenting the native Share dialog
FacebookDialog.ShareDialogFeatureDefines a set of features that may be supported by the native Share dialog exposed by the Facebook application
FacebookDialog.VideoMessageDialogBuilderProvides a builder which can construct a FacebookDialog instance suitable for presenting the native Message dialog for sharing videos
FacebookDialog.VideoShareDialogBuilderProvides a builder which can construct a FacebookDialog instance suitable for presenting the native Share dialog for sharing videos
FacebookRequestErrorThis class represents an error that occurred during a Facebook request
FacebookRequestError.CategoryAn enum that represents the Facebook SDK classification for the error that occurred
FbDialogThis class is deprecated
FriendPickerFragmentProvides a Fragment that displays a list of a user's friends and allows one or more of the friends to be selected
FriendPickerFragment.FriendPickerType
GraphObject.FactoryCreates proxies that implement GraphObject, GraphObjectList, and their derived types
HttpMethodEnumeration of HTTP methods supported by Request
InsightsLoggerThis class is deprecated
LegacyHelperLegacyHelper is solely for the use of other packages within the Facebook SDK for Android
LikeViewThis class provides the UI for displaying the Facebook Like button and its associated components
LikeView.AuxiliaryViewPositionEncapsulates the valid values for the facebook:auxiliary_view_position attribute for a LikeView
LikeView.HorizontalAlignmentEncapsulates the valid values for the facebook:horizontal_alignment attribute for a LikeView
LikeView.StyleEncapsulates the valid values for the facebook:style attribute for a LikeView
LoggingBehaviorSpecifies different categories of logging messages that can be generated
LoginActivityThis Activity is a necessary part of the overall Facebook login process but is not meant to be used directly
LoginButtonA Log In/Log Out button that maintains session state and logs in/out for the app
LoginButton.ToolTipMode
NativeAppCallAttachmentStoreThis class works in conjunction with NativeAppCallContentProvider to allow apps to attach binary attachments (e
NativeAppCallContentProviderImplements a ContentProvider that can be used to provide binary attachments (e
NonCachingTokenCachingStrategyImplements a trivial TokenCachingStrategy that does not actually cache any tokens
OpenGraphAction.FactoryExposes helpers for creating instances of OpenGraphAction
OpenGraphObject.FactoryExposes helpers for creating instances of OpenGraphObject
PickerFragmentProvides functionality common to SDK UI elements that allow the user to pick one or more graph objects (e
PlacePickerFragment
ProfilePictureViewView that displays the profile photo of a supplied profile ID, while conforming to user specified dimensions
RequestA single request to be sent to the Facebook Platform through the Graph API
RequestAsyncTaskDefines an AsyncTask suitable for executing a Request in the background
RequestBatchRequestBatch contains a list of Request objects that can be sent to Facebook in a single round-trip
ResponseEncapsulates the response, successful or otherwise, of a call to the Facebook platform
Response.PagingDirectionIndicates whether paging is being done forward or backward
Session Session is used to authenticate a user and manage the user's session with Facebook
Session.AuthorizationRequestBase class for authorization requests Session
Session.BuilderBuilder class used to create a Session
Session.NewPermissionsRequestA request to be used to request new permissions for a Session
Session.OpenRequestA request used to open a Session
SessionDefaultAudienceCertain operations such as publishing a status or publishing a photo require an audience
SessionLoginBehaviorSpecifies the behaviors to try during openForRead
SessionState Identifies the state of a Session
SettingsAllows some customization of sdk behavior
SharedPreferencesTokenCachingStrategy
TestSessionImplements an subclass of Session that knows about test users for a particular application
TokenCachingStrategy A base class for implementations of a Session token cache
ToolTipPopup
ToolTipPopup.Style
UiLifecycleHelperThis class helps to create, automatically open (if applicable), save, and restore the Active Session in a way that is similar to Android UI lifecycles
UserSettingsFragmentA Fragment that displays a Login/Logout button as well as the user's profile picture and name when logged in
UtilUtility class supporting the Facebook Object
WebDialogThis class provides a mechanism for displaying Facebook Web dialogs inside a Dialog
WebDialog.BuilderProvides a builder that allows construction of an arbitrary Facebook web dialog
WebDialog.FeedDialogBuilderProvides a builder that allows construction of the parameters for showing the Feed Dialog
WebDialog.RequestsDialogBuilderProvides a builder that allows construction of the parameters for showing the Requests Dialog
Interfaces
NameDescription
AppLinkData.CompletionHandlerInterface to asynchronously receive AppLinkData after it has been fetched
AsyncFacebookRunner.RequestListenerCallback interface for API requests
CreateGraphObjectUse this annotation setters in an interface that derives from GraphObject, if you wish to provide a setter that takes a primitive data type (e
Facebook.DialogListenerCallback interface for dialog requests
Facebook.ServiceListenerCallback interface for service requests
FacebookDialog.CallbackDefines a callback interface that will be called when the user completes interacting with a Facebook dialog, or if an error occurs
FacebookDialog.DialogFeatureProvides an interface for describing a specific feature provided by a FacebookDialog
GraphLocationProvides a strongly-typed representation of a Location as defined by the Graph API
GraphMultiResultDefines a GraphObject that represents the result of a query that returns multiple GraphObjects nested under a "data" property
GraphObjectGraphObject is the primary interface used by the Facebook SDK for Android to represent objects in the Facebook Social Graph and the Facebook Open Graph (OG)
GraphObjectListGraphObjectList is the primary representation of a collection of graph objects in the Facebook SDK for Android
GraphPlaceProvides a strongly-typed representation of a Place as defined by the Graph API
GraphUserProvides a strongly-typed representation of a User as defined by the Graph API
LikeView.OnErrorListenerCallback interface that will be called when a network or other error is encountered while logging in
LoginButton.OnErrorListenerCallback interface that will be called when a network or other error is encountered while logging in
LoginButton.UserInfoChangedCallbackSpecifies a callback interface that will be called when the button's notion of the current user changes (if the fetch_user_info attribute is true for this control)
OpenGraphActionProvides a strongly-typed representation of an Open Graph Action
OpenGraphObjectProvides a strongly-typed representation of an Open Graph Object
PickerFragment.GraphObjectFilterCallback interface that will be called to determine if a graph object should be displayed
PickerFragment.OnDataChangedListenerCallback interface that will be called when the underlying data being displayed in the picker has been updated
PickerFragment.OnDoneButtonClickedListenerCallback interface that will be called when the user clicks the Done button on the title bar
PickerFragment.OnErrorListenerCallback interface that will be called when a network or other error is encountered while retrieving graph objects
PickerFragment.OnSelectionChangedListenerCallback interface that will be called when the user selects or unselects graph objects in the picker
ProfilePictureView.OnErrorListenerCallback interface that will be called when a network or other error is encountered while retrieving profile pictures
PropertyNameUse this annotation on getters and setters in an interface that derives from GraphObject, if you wish to override the default property name that is inferred from the name of the method
Request.CallbackSpecifies the interface that consumers of the Request class can implement in order to be notified when a particular request completes, either successfully or with an error
Request.GraphPlaceListCallbackSpecifies the interface that consumers of Request
Request.GraphUserCallbackSpecifies the interface that consumers of Request
Request.GraphUserListCallbackSpecifies the interface that consumers of Request
Request.OnProgressCallbackSpecifies the interface that consumers of the Request class can implement in order to be notified when a progress is made on a particular request
RequestBatch.CallbackSpecifies the interface that consumers of the RequestBatch class can implement in order to be notified when the entire batch completes execution
RequestBatch.OnProgressCallbackSpecifies the interface that consumers of the RequestBatch class can implement in order to be notified when the batch makes progress
Session.StatusCallbackProvides asynchronous notification of Session state changes
WebDialog.OnCompleteListenerInterface that implements a listener to be called when the user's interaction with the dialog completes, whether because the dialog finished successfully, or it was cancelled, or an error was encountered
Exceptions
NameDescription
FacebookAuthorizationExceptionAn Exception indicating that a Session failed to open or obtain new permissions
FacebookDialogExceptionRepresents an error condition relating to displaying a Facebook Web dialog
FacebookErrorEncapsulation of a Facebook Error: a Facebook request that could not be fulfilled
FacebookExceptionRepresents an error condition specific to the Facebook SDK for Android
FacebookGraphObjectExceptionRepresents an error specific to the GraphObject class
FacebookOperationCanceledExceptionAn Exception indicating that an operation was canceled before it completed
FacebookServiceExceptionRepresents an error returned from the Facebook service in response to a request
Audience Network Classes
NameDescription
AdErrorAdError contains the error information returned by Facebook
AdSettingsAdSettings contains global settings for all ad controls
AdSizeAdSize is the dimension of the ad control
AdViewAdView displays advertisements by Facebook
InterstitialAdInterstitialAd displays an advertisement by Facebook in an interstitial
InterstitialAdActivityInterstitialAdActivity is the Android activity used by InterstitialAd to display ad
NativeAdNativeAd provides ad creative for apps to rendered in custom layout
NativeAd.ImageImage creative
NativeAd.RatingRating info
VideoAdActivity
Audience Network Interfaces
NameDescription
AdAd interface is a common interface implemented by all Facebook ad controls
AdListenerAdListener interface is notified of events in ad control lifecycle
ImpressionListenerImpressionListener interface is notified of impression events in ad control lifecycle
InterstitialAdListenerInterstitialAdListener interface is notified of events in InterstitialAd lifecycle