Skip to content
Used to integrate Android apps with Facebook Platform.
Java Other
  1. Java 99.4%
  2. Other 0.6%
Branch: master
Clone or download

Latest commit

KylinChang and facebook-github-bot Add check to avoid potential exceptions
Summary: As title

Reviewed By: Oliverccccct

Differential Revision: D21770247

fbshipit-source-id: f66a1484e0e90afebb7b05133efd11c6bbb6ac93
Latest commit df67ef0 May 29, 2020

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github Upload stale config for androidSDK Jan 9, 2020
.travis Fix the add tag message Mar 8, 2019
facebook-applinks Enable google-java-format formatter May 11, 2020
facebook-common Enable google-java-format formatter May 11, 2020
facebook-core Add check to avoid potential exceptions May 29, 2020
facebook-gamingservices Enable google-java-format formatter May 11, 2020
facebook-login Enable google-java-format formatter May 11, 2020
facebook-messenger Enable google-java-format formatter May 11, 2020
facebook-places Enable google-java-format formatter May 11, 2020
facebook-share Enable google-java-format formatter May 11, 2020
facebook Break up integrity manager tests based on use case May 27, 2020
gradle/wrapper get appid from JSSDK May 22, 2020
samples Enable google-java-format formatter May 11, 2020
scripts Add GamingServices component (#674) Feb 4, 2020
.gitignore Remove values-fb Nov 20, 2019
.travis.yml We androidX now (#766) May 4, 2020
CHANGELOG.md Catch RejectedExecutionException in schedule() (#771) May 8, 2020
CODE_OF_CONDUCT.md simple markup fixes (#594) Oct 15, 2019
CONTRIBUTING.mdown Misc cleanups getting ready to ship beta Sep 24, 2012
LICENSE.txt Facebook Android SDK 4.0 Mar 25, 2015
NOTICE.txt Facebook Android SDK 4.34 Jun 18, 2018
README.mdown Create SECURITY.md (#632) Nov 21, 2019
SECURITY.md Create SECURITY.md (#632) Nov 21, 2019
build.gradle Remove values-fb (#753) Apr 10, 2020
constants.gradle We androidX now (#766) May 4, 2020
gradle.properties We androidX now (#766) May 4, 2020
gradlew Facebook Android SDK 4.14 Jul 13, 2016
gradlew.bat Facebook Android SDK 4.14 Jul 13, 2016
maven.gradle Mark MarketingKit deprecated (#767) May 5, 2020
secring.gpg.enc Update .travis.yml (#542) Jan 11, 2019
settings.gradle Delete all (#703) Mar 13, 2020

README.mdown

Facebook SDK for Android

Build Status Maven Central

This open-source library allows you to integrate Facebook into your Android app.

Learn more about the provided samples, documentation, integrating the SDK into your app, accessing source code, and more at https://developers.facebook.com/docs/android

TRY IT OUT

  1. Check-out the tutorials available online at https://developers.facebook.com/docs/android/getting-started
  2. Start coding! Visit https://developers.facebook.com/docs/android/ for tutorials and reference documentation.

FEATURES

STRUCTURE

The SDK is separated into modules with the following structure. Each box represents a module with an estimated size when included into an app (when included using proguard and supporting a single language).

+---------------------------------------------------------------+
|                                                               |
|  Facebook-android-sdk : 399.09 kb                             |
|                                                               |
+---------------------------------------------------------------+
+----------+ +----------+ +----------+ +-----------+ +----------+
|          | |          | |          | |           | |          |
|          | |          | |          | |           | |          |
| Facebook | | Facebook | | Facebook | | Facebook  | | Facebook |
| -Login : | | -Share : | | -Places :| |-Messenger:| |-Applinks:|
|          | |          | |          | |           | |          |
| 304.06 kb| | 310.94 kb| | 76.48 kb | | 114.26 kb | | 89.73 kb |
+----------+ +----------+ |          | |           | |          |
+-----------------------+ |          | |           | |          |
|                       | |          | |           | |          |
| Facebook-Common : N/A | |          | |           | |          |
|                       | |          | |           | |          |
+-----------------------+ +----------+ +-----------+ +----------+
+---------------------------------------------------------------+
|                                                               |
| Facebook-Core : 75.12 kb                                      |
|                                                               |
+---------------------------------------------------------------+

Example: Including the Facebook-Login module (which depends on Facebook-Common and Facebook-Core) would increase your app's size by an estimated 276.94 kb and including just Facebook-Core would only increase your size by 52.61 kb.

USAGE

Facebook SDKs are broken up into separate modules as shown above. To ensure the most optimized use of space only install the modules that you intend to use. To get started, see the Installation section below.

INSTALLATION

Facebook SDKs are published to Maven as independent modules. To utilize a feature listed above include the appropriate dependency (or dependencies) listed below in your app/build.gradle file.

dependencies {
    // Facebook Core only (Analytics)
    implementation 'com.facebook.android:facebook-core:5.0.0'

    // Facebook Login only
    implementation 'com.facebook.android:facebook-login:5.0.0'

    // Facebook Share only
    implementation 'com.facebook.android:facebook-share:5.0.0'

    // Facebook Places only
    implementation 'com.facebook.android:facebook-places:5.0.0'

    // Facebook Messenger only
    implementation 'com.facebook.android:facebook-messenger:5.0.0'

    // Facebook App Links only
    implementation 'com.facebook.android:facebook-applinks:5.0.0'

    // Facebook Android SDK (everything)
    implementation 'com.facebook.android:facebook-android-sdk:5.0.0'
}

You may also need to add the following to your project/build.gradle file.

buildscript {
    repositories {
        mavenCentral()
    }
}

GIVE FEEDBACK

Please report bugs or issues to https://developers.facebook.com/bugs/

You can also visit our Facebook Developer Community Forum, join the Facebook Developers Group on Facebook, ask questions on Stack Overflow, or open an issue in this repository.

SECURITY

See the SECURITY POLICY for more info on our bug bounty program.

CONTRIBUTING

We are able to accept contributions to the Facebook SDK for Android. To contribute please do the following.

  • Follow the instructions in the CONTRIBUTING.mdown.
  • Submit your pull request to the master branch. This allows us to merge your change into our internal master and then push out the change in the next release.

LICENSE

Except as otherwise noted, the Facebook SDK for Android is licensed under the Facebook Platform License (https://github.com/facebook/facebook-android-sdk/blob/master/LICENSE.txt).

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

DEVELOPER TERMS

  • By enabling Facebook integrations, including through this SDK, you can share information with Facebook, including information about people’s use of your app. Facebook will use information received in accordance with our Data Use Policy (https://www.facebook.com/about/privacy/), including to provide you with insights about the effectiveness of your ads and the use of your app. These integrations also enable us and our partners to serve ads on and off Facebook.

  • You may limit your sharing of information with us by updating the Insights control in the developer tool (https://developers.facebook.com/apps/[app_id]/settings/advanced).

  • If you use a Facebook integration, including to share information with us, you agree and confirm that you have provided appropriate and sufficiently prominent notice to and obtained the appropriate consent from your users regarding such collection, use, and disclosure (including, at a minimum, through your privacy policy). You further agree that you will not share information with us about children under the age of 13.

  • You agree to comply with all applicable laws and regulations and also agree to our Terms (https://www.facebook.com/policies/), including our Platform Policies (https://developers.facebook.com/policy/) and Advertising Guidelines, as applicable (https://www.facebook.com/ad_guidelines.php).

By using the Facebook SDK for Android you agree to these terms.

You can’t perform that action at this time.