Facebook
Facebook SDK for Android Reference - Documentation - Meta for Developers
Classes
Name Description
AccessToken This class represents an immutable access token for using Facebook APIs
AccessTokenSource Indicates where a Facebook access token was obtained from
AccessTokenTracker This class can be extended to receive notifications of access token changes
AppEventsConstants Predefined 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.FlushBehavior Controls when an AppEventsLogger sends log events to the server
AppGroupCreationContent Describes the content that will be displayed by the AppGroupCreationDialog
AppGroupCreationContent.AppGroupPrivacy Specifies the privacy of a group
AppGroupCreationContent.Builder Builder class for a concrete instance of AppGroupCreationContent
AppInviteContent Describes the content that will be displayed by the AppInviteDialog
AppInviteContent.Builder Builder class for a concrete instance of AppInviteContent
AppInviteContent.Builder.Destination
AppInviteDialog A dialog for inviting users
AppInviteDialog.Result Helper object for handling the result from an app invites dialog
AppLinkData Class to encapsulate an app link, and provide methods for constructing the data from various sources
CallbackManager.Factory The factory class for the CallbackManager
CreateAppGroupDialog
CreateAppGroupDialog.Result
CustomTabActivity
CustomTabLoginMethodHandler
CustomTabMainActivity
DefaultAudience Certain operations such as publishing a status or publishing a photo require an audience
DeviceAuthDialog
DeviceLoginButton A Log In/Log Out button that maintains login state and logs in/out for the app
DeviceLoginManager This class manages device login and permissions for Facebook
DeviceShareButton A button to share content on Facebook from a device
DeviceShareDialog
DeviceShareDialog.Result
FacebookActivity This Activity is a necessary part of the overall Facebook SDK, but is not meant to be used directly
FacebookAppLinkResolver Provides an implementation for the AppLinkResolver interface that uses the Facebook App Link index to resolve App Links given a URL
FacebookBroadcastReceiver This class implements a simple BroadcastReceiver designed to listen for broadcast notifications from the Facebook app
FacebookButtonBase A base class for a facebook button
FacebookContentProvider Implements a ContentProvider that can be used to provide binary attachments (e
FacebookRequestError This class represents an error that occurred during a Facebook request
FacebookRequestError.Category An enum that represents the Facebook SDK classification for the error that occurred
FacebookSdk This class allows some customization of Facebook SDK behavior
FlushResult
GameRequestContent Describes the content that will be displayed by the GameRequestDialog
GameRequestContent.ActionType
GameRequestContent.Builder Builder class for a concrete instance of GameRequestContent
GameRequestContent.Filters
GameRequestDialog Provides functionality to send requests in games
GameRequestDialog.Result Helper object for handling the result from a requests dialog
GraphRequest A single request to be sent to the Facebook Platform through the Graph API
GraphRequest.ParcelableResourceWithMimeType Used during serialization for the graph request
GraphRequestAsyncTask Defines an AsyncTask suitable for executing a Request in the background
GraphRequestBatch RequestBatch contains a list of Request objects that can be sent to Facebook in a single round-trip
GraphResponse Encapsulates the response, successful or otherwise, of a call to the Facebook platform
GraphResponse.PagingDirection Indicates whether paging is being done forward or backward
HttpMethod Enumeration of HTTP methods supported by Request
JoinAppGroupDialog
JoinAppGroupDialog.Result
LikeView This class provides the UI for displaying the Facebook Like button and its associated components
LikeView.AuxiliaryViewPosition Encapsulates the valid values for the facebook:auxiliary_view_position attribute for a LikeView
LikeView.HorizontalAlignment Encapsulates the valid values for the facebook:horizontal_alignment attribute for a LikeView
LikeView.ObjectType Encapsulates the valid values for the facebook:object_type attribute for a LikeView
LikeView.Style Encapsulates the valid values for the facebook:style attribute for a LikeView
LoggingBehavior Specifies different categories of logging messages that can be generated
LoginBehavior Specifies the behaviors to try during login
LoginButton A Log In/Log Out button that maintains login state and logs in/out for the app
LoginButton.LoginClickListener
LoginButton.ToolTipMode The display modes for the login button tool tip
LoginFragment This Fragment is a necessary part of the overall Facebook login process but is not meant to be used directly
LoginManager This class manages login and permissions for Facebook
LoginResult This class shows the results of a login operation
MessageDialog Provides functionality to send content via the Facebook Message Dialog
Profile This class represents a basic Facebook profile
ProfilePictureView View that displays the profile photo of a supplied profile ID, while conforming to user specified dimensions
ProfileTracker This class can be extended to receive notifications of profile changes
SendButton A button to share content through Messenger
ShareApi Provides an interface for sharing through the graph API
ShareButton A button to share content on Facebook
ShareButtonBase A base class for sharing buttons
ShareContent Provides the base class for content to be shared
ShareContent.Builder Abstract builder for ShareContent
ShareDialog Provides functionality to share content via the Facebook Share Dialog
ShareDialog.Mode The mode for the share dialog
ShareHashtag Describes a hashtag for sharing
ShareHashtag.Builder Builder for the ShareHashtag class
ShareLinkContent Describes link content to be shared
ShareLinkContent.Builder Builder for the ShareLinkContent interface
ShareMedia Base class for shared media (photos, videos, etc)
ShareMedia.Builder Builder for the ShareMedia class
ShareMedia.Type
ShareMediaContent
ShareMediaContent.Builder Builder for the SharePhotoContent interface
ShareOpenGraphAction Describes an Open Graph action Use ShareOpenGraphAction
ShareOpenGraphAction.Builder Builder for the ShareOpenGraphAction interface
ShareOpenGraphContent Describes Open Graph content that is to be shared Use ShareOpenGraphContent
ShareOpenGraphContent.Builder Builder for the ShareOpenGraphContent interface
ShareOpenGraphObject Describes an Open Graph Object to be created
ShareOpenGraphObject.Builder Builder for the ShareOpenGraphObject interface
ShareOpenGraphValueContainer Provides an abstract class to contain Open Graph values
ShareOpenGraphValueContainer.Builder Abstract builder for the ShareOpenGraphValueContainer class
SharePhoto Describes a photo for sharing
SharePhoto.Builder Builder for the SharePhoto class
SharePhotoContent Describes photo content to be shared
SharePhotoContent.Builder Builder for the SharePhotoContent interface
Sharer.Result Helper object for handling the result from a share dialog or share operation
ShareVideo Describes a video for sharing
ShareVideo.Builder Builder for the ShareVideo class
ShareVideoContent Provides the interface for video content to be shared
ShareVideoContent.Builder Builder for the ShareVideoContent interface
TestUserManager This class manages Facebook test users
ToolTipPopup This displays a popup tool tip for a specified view
ToolTipPopup.Style The values here describe the styles available for the tool tip class
Interfaces
Name Description
AccessToken.AccessTokenCreationCallback A callback for creating an access token from a NativeLinkingIntent
AccessToken.AccessTokenRefreshCallback
AppLinkData.CompletionHandler Interface to asynchronously receive AppLinkData after it has been fetched
CallbackManager The CallbackManager manages the callbacks into the FacebookSdk from an Activity's or Fragment's onActivityResult() method
FacebookCallback A callback class for the Facebook SDK
FacebookDialog Represents dialogs provided by Facebook
FacebookSdk.InitializeCallback Callback passed to the sdkInitialize function
GraphRequest.Callback Specifies 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
GraphRequest.GraphJSONArrayCallback Callback for requests that result in an array of JSONObjects
GraphRequest.GraphJSONObjectCallback Callback for requests that result in a JSONObject
GraphRequest.OnProgressCallback Specifies the interface that consumers of the Request class can implement in order to be notified when a progress is made on a particular request
GraphRequestBatch.Callback Specifies the interface that consumers of the RequestBatch class can implement in order to be notified when the entire batch completes execution
GraphRequestBatch.OnProgressCallback Specifies the interface that consumers of the RequestBatch class can implement in order to be notified when the batch makes progress
LikeView.OnErrorListener Callback interface that will be called when a network or other error is encountered while logging in
ProfilePictureView.OnErrorListener Callback interface that will be called when a network or other error is encountered while retrieving profile pictures
ShareBuilder Interface for builders related to sharing
ShareModel Base interface for share models
ShareModelBuilder Interface for builders related to sharing
Sharer The common interface for components that initiate sharing
Exceptions
Name Description
FacebookAuthorizationException An Exception indicating that Login failed
FacebookDialogException Represents an error condition relating to displaying a Facebook Web dialog
FacebookException Represents an error condition specific to the Facebook SDK for Android
FacebookGraphResponseException Represents an issue that's returned by the Graph API
FacebookOperationCanceledException An Exception indicating that an operation was canceled before it completed
FacebookSdkNotInitializedException An Exception indicating that the Facebook SDK has not been correctly initialized
FacebookServiceException Represents an error returned from the Facebook service in response to a request
Audience Network Classes
Name Description
AbstractAdListener AbstractAdListener implements AdListener, InterstitialAdListener and ImpressionListener
AdChoicesView An expandable, clickable ad choices icon
AdError AdError contains the error information returned by Facebook
AdNetwork
AdSettings AdSettings contains global settings for all ad controls
AdSize AdSize is the dimension of the ad control
AdView AdView displays advertisements by Facebook
AudienceNetworkActivity AudienceNetworkActivity is the Android activity used by the Audience Network SDK to display fullscreen content
AudienceNetworkActivity.Type
InstreamVideoAdView InstreamVideoAd displays a Instream video advertisement by Facebook To use the Instream video, do the following: InstreamVideoAdView InstreamVideo = new InstreamVideoAdView(context, PLACEMENT_ID); InstreamVideoView
InterstitialAd InterstitialAd displays an advertisement by Facebook in an interstitial
InterstitialAdActivity
MediaView Mediaview displays native ad media content
NativeAd NativeAd provides ad creative for apps to rendered in custom layout
NativeAd.Image Image creative
NativeAd.MediaCacheFlag Media Cache flag
NativeAd.Rating Rating info
NativeAdScrollView NativeAdScrollView provides a horizontal scrolling experience hosting either NativeAdViews or custom views
NativeAdsManager The NativeAdsManager provides a mechanism to fetch a set of NativeAds and then use them within your application
NativeAdView NativeAdView provides a templated view for a NativeAd with flexible width and height determined by NativeAdView
NativeAdView.Type
NativeAdViewAttributes NativeAdViewAttributes controls layout and display elements of the NativeAdView
Audience Network Interfaces
Name Description
Ad Ad interface is a common interface implemented by all Facebook ad controls
AdListener AdListener interface is notified of events in ad control lifecycle
AudienceNetworkActivity.BackButtonInterceptor
ImpressionListener
InstreamVideoAdListener InstreamVideoAdListener interface is notified of events in InstreamVideoAdView lifecycle
InterstitialAdListener InterstitialAdListener interface is notified of events in InterstitialAd lifecycle
NativeAdScrollView.AdViewProvider
NativeAdsManager.Listener
Messenger Classes
Name Description
MessengerThreadParams Parameters describing the Intent that Messenger sent to the app
MessengerThreadParams.Origin The origin of the flow that user originated from
MessengerUtils Utilities for Messenger Content Platform
ShareToMessengerParams Parameters used by MessengerUtils for sending the media to Messenger to share
ShareToMessengerParamsBuilder Builder for ShareToMessengerParams
Build a Mobile Site
View Site in Mobile | Classic
Share by: