Android facebook SDK as JAR

后端 未结 5 1624
闹比i
闹比i 2020-12-29 03:35

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

相关标签:
5条回答
  • 2020-12-29 03:57

    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.

    0 讨论(0)
  • 2020-12-29 04:01

    You can create a jar file :

    1. Download Facebook Android SDK from github.
    2. Extract it. (at any location).
    3. In Eclipse create new project using create project from existing source option
    4. Enter the project name as "com_facebook_android".
    5. Set Location to "facebook" folder in extracted location.
    6. Click Finish.
    7. Select the "com_facebook_android" project in project explorer and right click select export option.
    8. In the export wizard select JAR file in Java folder.
    9. Click next then browse the location for jar file and give the name as yor wish like "facebook-android.jar"
    10. Click finish........ JAR file will be created in that location
    0 讨论(0)
  • 2020-12-29 04:08

    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

    0 讨论(0)
  • 2020-12-29 04:08

    Well guys you dont need to manually make a .jar file out of facebook-android-sdk. You can use easyfacebook.jar. It currently supports:

    1. Oauth 2.0 authentication support
    2. Use the access token
    3. Pictures upload support
    4. Supports all the features of Graph API
    5. It can run any query FQL
    6. Contains BEAN of all facebook objects
    7. It's free. LGPL GNU license
    8. Progress dialog
    9. Logout function
    10. Server/Request Error Management
    11. Key hash/Geo Tagging
    12. Login without facebook app
    0 讨论(0)
  • 2020-12-29 04:12

    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 =)

    0 讨论(0)
提交回复
热议问题