Android facebook SDK as JAR

20,802

Solution 1

Yes! I just figured it out myself.

You need two jar files:

  1. facebooksdk.jar
  2. android-support-v4.jar

Option 1
The first can be found in the bin folder, the latter in the Android Dependencies folder. (Of the FacebookSDK project) After adding them both as libraries to my project (Project --> properties --> Java Build Path --> Libraries) it actually worked.

Option 2
Another way is to copy paste the facebooksdk.jar and get the android-support-v4.jar via Right-click on project --> Android Tools --> Add Support Library.

Good luck =)

Solution 2

Kasgoku,

The code is provided as a project for easy viewing of the classes. Adding it as an included jar or just moving the source into your project also works. When I created an FB connected android app, I moved the files I needed into a package in my app.

Solution 3

It looks like maven has them cached.

http://search.maven.org/remotecontent?filepath=com/facebook/android/facebook-android-sdk/4.4.0/facebook-android-sdk-4.4.0-sources.jar

Share:
20,802
kasgoku
Author by

kasgoku

Updated on July 16, 2020

Comments

  • kasgoku
    kasgoku almost 4 years

    Are there any cons of build the facebook SDK library project into a JAR file(as ADT 16 does with library projects) and adding it to your project? I am not changing anything in the facebook SDK so don't need to have it added as a library project. So far it has been working fine for me and I am wondering whether this is a common practice used by developers using the facebook SDK? It speeds up the build process quite a bit because Eclipse doesn't have to resolve all of the resources in the library projects.