Those who tried to integrate facebook features into his own Android application knows that it's not an easy thing to do. We tested many libraries: FbRocket, FbConnect and even facebook's official sdk, but their implementation was very complicated or they had very few features. That's why we decided to create our own library from scratch. The highlights of EASY FACEBOOK ANDROID SDK are:

  • Oauth 2.0 authentication support
  • Use the access token
  • Pictures upload support
  • Supports all the features of Graph API
  • It can run any query FQL
  • Contains BEAN of all facebook objects
  • It's free. LGPL GNU license
  • Progress dialog (Updated 14/04/2011 - from version 1.1)
  • Logout function (Updated 17/04/2011 - from version 1.2)
  • Server/Request Error Management (Updated 24/04/2011 - from version 1.3)
  • Key hash/Geo Tagging (Updated 10/05/2011 - from version 2.0)
  • Login without facebook app installed/ bug of "number object limit" solved (Updated 14/05/2011 - from version 2.1)




Future developments:

  • Parse FQL response


The only information required to use the Easy facebook Android SDK are:


With this library you can use almost all the feature from facebook Graph API, run every FQL query, and some of the REST API features. To download the latest version of the library, please visit the download page. To understand how this library works go to the demo page where you can find many sample. All thes documentation is in the reference page instead.

If your name is Mark Zuckerberg and you want to give us a job, or if you are not he and want to report bugs, give us advice, you can use the form down here or in the contact page.

Comment

    jhon says:
    31/03/2011


    Good facebook API thanks!

    REPLY

    David says:
    31/03/2011


    I have integrate facebook in my android application thank you.

    REPLY

    Pedro says:
    05/04/2011


    This API is better than facebook Android sdk

    REPLY

    Mario Romano says:
    18/04/2011


    Thank you Pedro

    REPLY

    Mehdi Nahro says:
    08/04/2011


    This a great SDK to work with if you could please provide a little more documentation as of how to update status for example. Thank you very much.

    REPLY

    Easy android sdk says:
    08/04/2011


    You can find example on http://www.easyfacebookandroidsdk.com/example.asp .... setMyStatus.zip

    REPLY

    Mehdi Nahro says:
    08/04/2011


    I have been working on it this afternoon and it doesn't seem to work. So I have one question can you please give me an example with FacebookApplicationSite or if you explain what this is. I really appreciate it.

    REPLY

    Easy android sdk Facebook says:
    08/04/2011


    ApplicationSite is explain on http://www.easyfacebookandroidsdk.com/guide.asp

    REPLY

    Mehdi Nahro says:
    08/04/2011


    I read all of the website but I still need some clarification on the tutorial. I got 80% working I get the permission the login but when I log in I get a blank (white page) so I know that the login has been successful but what i want to achieve is posting to my wall or update my status if you can give me a clear path of how to achieve that I would really appreciate it .

    REPLY

    Easy android sdk says:
    08/04/2011


    When your status is updated , example application display a white page with code of your feed...do you have only blank page?

    REPLY

    Mehdi Nahro says:
    08/04/2011


    I never get to enter my status and when I log in it just goes into a blank page.

    REPLY

    Easy android sdk says:
    08/04/2011


    This example does not allow you to enter a state from a form, but inserts a standard message ... like this "I like easy facebook Android sdk ".... when the message is added to the application shows a white page with the message code

    REPLY

    Mehdi Nahro says:
    08/04/2011


    ok I'm going to work on it, and on which file should insert the desired message. Again thank you for the huge help.

    REPLY

    Fernando says:
    12/04/2011


    when I start the application session stop, I requested permission to facebook application, I accept and the application stops. So what can occasion?

    REPLY

    Mario Romano says:
    12/04/2011


    you used an example from our demo page or have integrated the library into your own application? Try a sample from the demo page

    REPLY

    Fernando says:
    13/04/2011


    I'm using the example of FQL myfriend 1.1. just run it and showed me an error. I modify this code FacebookConnection class in method onLoginSuccess: String s = "not valid" try { if (facebook.sessionIsValid ()) s = "if it is valid"; } catch (ServerErrorException e) { / / TODO Auto-generated catch block e.printStackTrace (); } String pkg = getPackageName (); intentResult.putExtra (pkg + ". FQL", s); startActivity (intentResult) and I must, that the session is not valid. This is my problem? please help me...

    REPLY

    Mario Romano says:
    16/04/2011


    What permissions do you put in the array String permissions[] ?

    REPLY

    Erick says:
    17/04/2011


    Good LGPL Android library!

    REPLY

    white8824 says:
    19/04/2011


    I just impoted the myStatus and change the parameters with those of my application in fbManager. Everytime when I execute this. It has a toast "Login failed". What's the problem??

    REPLY

    Eugenio Romano says:
    20/04/2011


    What version do you have downloaded?

    REPLY

    NeK says:
    24/04/2011


    Hi Eugenio Romano,

    I was wondering what would be the problem in myStatus_1.2.2.zip.
    I have the same problem as white8824.

    "I just imported the myStatus and change the parameters with those of my application in fbManager. Everytime when I execute this, it has a toast "Login failed". "

    How can I track the bug?

    Thanks for your help.

    REPLY

    Eugenio Romano says:
    24/04/2011


    Hi Nek do you have setted this page "http://www.easyfacebookandroidsdk.com/accesstokenpage/" in the Connect section of the Control Panel of your facebook apllication? "Website->Site URL"

    REPLY

    NeK says:
    24/04/2011


    Thanks for your advice.

    Your sdk is great. I think the bug was in the Android Facebook app. (https://github.com/facebook/facebook-android-sdk/issues/191)
    Anyway I wiped out all the user data and restarted the emulator and worked.

    REPLY

    Eugenio Romano says:
    24/04/2011


    Thanks tell it to mark ;)

    REPLY

    Michael says:
    21/04/2011


    Hi there, I am looking for a FB integration to my Android app that can interact with a facebook music page, reading and posting comments mainly. Is this possible with your library ?

    REPLY

    Mario Romano says:
    21/04/2011


    yes it's possible...you can read reference

    REPLY

    Michael says:
    21/04/2011


    thanks. thats great to hear. could you point me in the right direction with what API call I can post comments to fan pages ? thanks a bunch.

    REPLY

    Michael says:
    21/04/2011



    Hi there,

    got an initial problem. I always get a login failed message.

    This is what happens:

    I implemented the example as given. First the message "Connect to facebook..." comes, then the Facebook login screen. after entering login info I get a permissions allow screen but before I can press the Allow button the event "onLoginFail" gets fired and thats it. Any clue what is going wrong here ?

    The app on Facebook is published and the status is "Directory Status: Not Submitted". I use Android 2.2 OS.

    The code I use is straight forward:

    public void shareFacebook() {

    //change the permissions according to the function you want to use

    String permissions[] = { "user_relationship_details",
    "user_religion_politics",
    "user_work_history",
    "user_relationships",
    "user_interests",
    "user_likes",

    "user_location",
    "user_hometown",
    "user_education_history",
    "user_activities",
    "read_stream",
    "offline_access"};

    //change the parameters with those of your application

    fbManager = new FBLoginManager(this, "NameApp", "FacebookApplicationAPIKEY","FacebookApplicationSECRETKEY", "FacebookApplicationID","http://www.easyfacebookandroidsdk.com/accesstokenpage/",permissions);

    REPLY

    Mario Romano says:
    21/04/2011


    Hi Michael do you have setted this page "http://www.easyfacebookandroidsdk.com/accesstokenpage/" in the Connect section of the Control Panel of your facebook apllication?

    REPLY

    Michael says:
    21/04/2011


    Hi Mario,

    thanks for getting back to me. No, I have not. It seems FB changed the layout of the "Edit App" page. I cannot find a connect section.

    There are a few spots in there where URLs can be maintained. Here are the ones:

    About->Privacy Policy URL
    About->Terms of Service URL
    Website->Site URL
    Facebook Integration->Canvas URL
    Facebook Integration->Secure Canvas URL
    Facebook Integration->Bookmark URL
    Facebook Integrarion->Tab URL
    Facebook Integrarion->Secure Tab URL
    Facebook Integrarion->Edit URL
    Credits->Credit Callback URL
    Advanced->Deauthorize Callback

    Could you please help me chose the right sport for the URL ?

    REPLY

    Mario Romano says:
    21/04/2011


    Website->Site URL

    REPLY

    Michael says:
    21/04/2011


    great, that worked. Really appreciate your help and thanks for putting together such a great library.
    Now to my original question. How can I post a comment to a Fan Page. You said that works with your api but I cannot find the right object. Can you point me in the right direction ?
    Basically I want to read the Fan Page wall posts and enable to post a comment there.
    thanks again

    REPLY

    Michael says:
    21/04/2011


    Hi Mario,

    this is a truly amazing library. I really wished I understand how you get around the hash code logic. Amazing.

    I am nearly there. I face one more issue. Here a code snipplet:

    GraphApi graphApi= new GraphApi(facebook);

    Page p = graphApi.getPage(Global.FacebookFanPage);

    List<Feed> lst = new ArrayList<Feed>();

    lst = graphApi.getAllPostFriends( Global.FacebookFanPage );

    String ret = graphApi.postToFriend("test", Global.FacebookFanPage );


    I get the fan page object. That works great.
    I read the wall posts of the page. That works great as well.
    I try to post to the wall. This is not working. The return "ret" is null.

    I use the following permissions:

    String permissions[] = { "user_relationship_details",
    "user_religion_politics",
    "user_work_history",
    "user_relationships",
    "user_interests",
    "user_likes",
    "user_location",
    "user_hometown",
    "user_education_history",
    "user_activities",
    "read_stream",
    "publish_stream",
    "manage_pages",
    "offline_access"};


    What goes wrong here?

    Thanks so much (hopefully my last question).

    Michael

    P.S. Once all solved I will write an article about my experience with your SDK. People need to know....

    REPLY

    Mario Romano says:
    21/04/2011


    On this page it's enable posting from other user?

    REPLY

    Michael says:
    21/04/2011


    Yes people can post comments.

    REPLY

    Mario Romano says:
    21/04/2011


    This user like this page?

    REPLY

    Michael says:
    21/04/2011


    The user is me and I am the admin of the page.

    REPLY

    Michael says:
    21/04/2011


    correction:

    I added the permission to post this morning to the code. The login for facebook was cached from yesterday.
    So I cleared the cache of the application. Restarted the application again, the login screen came up and also the "Give permission" screen came up again.

    After that it worked. :-)

    Thanks again for a wonderful API.

    REPLY

    Michael says:
    21/04/2011


    Also what do you require when deploying to the marketplace regarding the use of your lib?

    REPLY

    Mario Romano says:
    21/04/2011


    My library it's released with LGPL license , you can use without problem....If you want you can insert the icon somewhere in application with written "powered by Easy Facebok Android SDK"

    REPLY

    Michael says:
    21/04/2011


    sounds good. thank you.

    BTW: the problem I had earlier if I understand right had to do with the fact that I cached the FB Login but introduced a new permission. Since It always used the cached one it never asked me if I allow this new permission. How does it store the cache for FB Single Sign On and how could we force to clear in the event we introduced a new permission in the application ? Just thinking ahead here.

    REPLY

    Mario Romano says:
    21/04/2011


    You can use GraphApi.logout() method before to login , so user it's forced to logged in and accept new permission evrytime...

    REPLY

    Michael says:
    22/04/2011


    Gotcha. Thank you.

    REPLY

    Michael says:
    25/04/2011


    Hi There,

    I am reading comments from a fan page. Works great. I use graphapi.getPostFriends.

    For each feed I use the getFrom to get the name of the user who posted.
    I also would love to get the profile picture of the user who posted a comment similarily what Facebook is doing.

    What is the easiest way to get the profile picture ? I guess I could read use getAllPhotosFriends but then I am not sure if permission would let me because obviously in a fan page the current user is not likely a friend with every poster.

    Thanks in advance for your thoughts,
    Michael

    REPLY

    Mario Romano says:
    26/04/2011


    Use FQL.getFriend(friend_id) this returns an object of type Friend , to get pic use Friend.getPic()

    REPLY

    Michael says:
    26/04/2011


    Hi There,

    looking at the object FQL I do not see a method getFriend, only a method to post a query.

    Could you point me towards the object ?

    Thanks,
    Michael

    REPLY

    Mario Romano says:
    26/04/2011


    Download 1.3 verison

    REPLY

    Michael says:
    27/04/2011


    oh wow. You cranked a new version out. Sweet. :-)

    And it is working great. Great job.

    REPLY

    Luqman Hakim says:
    24/04/2011


    its great API
    i need to get my profile picture, how to do that? please give me simple sample

    REPLY

    Eugenio Romano says:
    24/04/2011


    Not is hard to do...you can use GraphApi.getAllPhotosMy()

    REPLY

    Luqman Hakim says:
    25/04/2011


    public void onLoginSuccess(Facebook facebook) {
    try{
    GraphApi graphApi= new GraphApi(facebook);
    List<Photo> photos = graphApi.getAllPhotosMy();
    Photo photo = photos.get(0);
    String pkg=getPackageName();
    intentResult.putExtra(pkg+".myFoto",photo.getSource());
    startActivity(intentResult);
    }catch (Exception e) {
    fbManager.displayToast(e.getMessage());
    }
    }

    i got error "invalid index 0, size is 0"

    sorry I am still very beginner, please give a simple example code to display current profile picture in imageview.

    REPLY

    Eugenio Romano says:
    25/04/2011


    What permissions do you have set in the array permissions[] ?

    REPLY

    Luqman Hakim says:
    25/04/2011


    String permissions[] = { "user_relationship_details",
    "user_religion_politics",
    "user_work_history",
    "user_relationships",
    "user_interests",
    "user_likes",
    "user_location",
    "user_hometown",
    "user_education_history",
    "user_activities",
    "read_stream",
    "offline_access"};

    REPLY

    Eugenio Romano says:
    25/04/2011


    try with this permission :

    String permissions[] = { "read_stream",
    "offline_access",
    "user_photos",
    "user_photo_video_tags",
    "friends_photos",
    "friends_photo_video_tags"};

    REPLY

    Gosu says:
    26/04/2011


    Hey, I've just tried using your library in order to connect and post something to facebook.
    It seems really great and much simpler than using the facebook api itself.
    However, I have a few questions that I need to clarify with you.

    1) What is the minimum sdk version required to use your library? I tried using both 1.6 and 2.2 and it seemed to me that it only works on android 2.2 .. Is android 2.2 the minimum sdk requirement?

    2) When it goes to facebook login page, which I assume is a webview that you created, I click on the text field but I can't enter anything. I've to press the down arrow, so that the text field will somehow gain focus and I can start typing. Is there something that I'm doing wrongly?

    Btw, I'm testing it on a 2.2 emulator. I've a android phone running on 2.2 as well but I've yet to try it on my phone. Is there something I'm doing wrongly or it's perhaps just a emulator problem?

    REPLY

    Mario Romano says:
    26/04/2011


    The library was built on Android 2.2, but should work with earlier versions. I Think the problem with your login depends on your emulator, try with your phone and let us know

    REPLY

    Gosu says:
    26/04/2011


    Just tested it out on my phone running on 2.2..

    With regards to the facebook login page, which I think is a webview or webviewclient that you created, the normal behavior which should occur when you click on the email/password text fields is that the on-screen keyboard should pop up. However, it doesn't pop up no matter how I click on the text fields.

    Can you help me out with this issue? Thanks.

    REPLY

    Mario Romano says:
    26/04/2011


    Do you've locked the keyboard in the manifest file ?

    REPLY

    Gosu says:
    26/04/2011


    Locked the keyboard in the manifest file? I don't think I did anything to the keyboard in the manifest file ..

    REPLY

    Mario Romano says:
    26/04/2011


    Look into your manifest if you have something like this:

    Android: windowSoftInputMode = "stateHidden"

    the problem is in your code

    REPLY

    Gosu says:
    27/04/2011


    Hmmm, good point there. It might really be something I did ..

    I've another question here.

    When I call fbManager.loadfacebook(int returnWindow) or fbManager.login(int returnWindow) .. I realized that you were passing in a layout resource for it to load when it was done with the webview. Is it possible for me to let it return to the previous activity view instead? e.g. A -> facebook webview -> A ..

    That's because I would like it to return to the activity after it has successfully logged into facebook, and I can use the facebook graph api from that activity.

    REPLY

    Gosu says:
    27/04/2011


    I think I've finally got it working in my application. The previous problem I had was due to the webview not gaining focus somehow, but got it fixed after all.

    Really enjoyed using your library as it's really much easier as compared to facebook's api.

    Thanks a lot! :D

    REPLY

    tom says:
    26/04/2011


    Hi,

    I'm sorry I'm such a noob but I don't even know how to get the demos or the api working in eclipse. I've downloaded the mystatus.zip demo, how do I get it into Eclipse to be able to execute it?

    Also, how do I "link in" the SDK in .jar format in Eclipse (I've never done this, always just used native android SDK stuff so far).

    Thanks for your time,

    Infinitifizz

    REPLY

    tom says:
    26/04/2011


    Okay sorry I've got the examples working in Eclipse now but none of them work, after granting permission to the app I always get the "Login Failed" toast, with all 3 demo apps, once the myStatus1.3 app posted to my wall but that's it.

    REPLY

    Eugenio Romano says:
    26/04/2011


    Do you have setted this page "http:// www.easyfacebookandroidsdk.com/ accesstokenpage/" in the Connect section of the Control Panel of your facebook apllication? "Website->Site URL"
    Please read guide and comment before posting

    REPLY

    tom says:
    26/04/2011


    Sorry for being stupid before, I've got it working now thanks, really simple api :-)

    But I've ran into a problem. I am using the myFriend example and in FacebookConnect.java in onLoginSuccess(), you seem to make a JSONSingleObjectDecode that is never used and the facebook data is displayed in the TextView as raw xml, not even json.

    I was just wondering how to use the JSONSingleObjectDecode class and how to parse the results of FQL queries?

    Thanks so much for your time,

    Infinitifizz

    REPLY

    tom says:
    26/04/2011


    Hi,

    I've found the error I'm getting now, I'm trying to use JSONSingleObjectDecode and JSONObjectDecode but always get a JSONException thrown because the results seem to be in XML not JSON, any idea why this is happening?

    Thanks,

    Infinitifizz

    REPLY

    Eugenio Romano says:
    26/04/2011


    Parse of FQL queries is not implemented yet, if you want to implement it can use as an example GraphAPI class

    REPLY

    tom says:
    26/04/2011


    Ah okay, it seems weird that it returns as XML rather than JSON though :S I know this isn't your fault as the URL has "format=json" on it, it's really annoying though because you have that parser in there!

    Thanks for your help and keep up the great work :)

    REPLY

    Mario Romano says:
    10/05/2011


    Hello i have released 2.0 version of easy facebook Android sdk , new features : geo tagging, comment reply function , hash Key support

    REPLY

    William says:
    10/05/2011


    After taking the MyFacebookInfo example and inserting the id and keys for my app, and hooking up the LoginListener (its not hooked up in the 1.3 example) I'm still getting the "Login Failed" toast.

    I've set http://www.easyfacebookandroidsdk.com/accesstokenpage/ in the FB AppSettings\WebSIte\SiteUrl

    What else do I need to do?

    REPLY

    Mario Romano says:
    10/05/2011


    Set Key hash as it's described in the guide page , after that try to download 2.0 example.

    REPLY

    Michael says:
    10/05/2011


    Hi Mario,

    thanks for putting this version out.

    However, I do have big issues to get this one working at all.

    I created a Hash via keytool -exportcert -alias androiddebugkey -keystore ~/.android/debug.keystore | openssl sha1 -binary | openssl base64 and updated the facebook app.

    Then I tried to run the code. Interesting is that it first launches the onActivityResult method and then the loginSuccess method. However the Facebook parameter is basically empty (e.g. accessToken = null ...).

    So, whatever I tried it is not working. I just found it strange that it still called the loginSuccess method though.

    I read alot about creating the Hash code and alot of people experienced trouble with it.

    Could you indicate how you successfully create the Hash Key ? Are you on a windows System ? Did you use dos prompt or a bash tool ?

    Hope I can get this going or I have to fall back to 1.3 again.

    Thanks,
    Michael

    REPLY

    Mario Romano says:
    11/05/2011


    Hi Michael

    I have used dos prompt of Windows 7 64bit.

    keytool -exportcert -alias androiddebugkey -keystore C:\.android\debug.keystore | openssl sha1 -binary | openssl base64

    If you don't have openssl on your pc , you can download them here : http://code.google.com/p/openssl-for-windows/downloads/list

    The path of your debug.keystore it's right ? You can see the correct path in eclipse : (Window->Preference->Android->Build->Default debug keystore)

    REPLY

    Michael says:
    11/05/2011


    Hey Mario,

    could not get the Hash generated right via the keytool. It generated one but it did not work. I am also on Win7/64bit.

    I found code to actually reengineer the hash code using getPackageManager(). The hash key I got through the code worked. :-)

    BTW, did you get a chance to check the issue I have reported with get Friend Posts when the limit is greater then the actual posts on the fan page ?

    thanks,
    Michael

    REPLY

    Mario Romano says:
    11/05/2011


    Hi Michael

    Nice...can you send me the snippet code used by you to generate Key hash ?

    I hope to resolve friend posts issue in the next release

    REPLY

    Michael says:
    11/05/2011


    Sure. Here it is:

    private void getHashKey()
    {
    String hashKey = "";

    try
    {
    PackageInfo info = getPackageManager().getPackageInfo("com.smartmove.android.myband.mozzak",
    PackageManager.GET_SIGNATURES);
    for (android.content.pm.Signature signature : info.signatures)
    {
    MessageDigest md = MessageDigest.getInstance("SHA");
    md.update(signature.toByteArray());
    hashKey = Base64.encode(md.digest());
    Toast.makeText(this, hashKey, Toast.LENGTH_LONG).show();
    }

    }
    catch (NameNotFoundException e)
    {
    Toast.makeText(this, e.getMessage(), Toast.LENGTH_LONG).show();
    }
    catch (NoSuchAlgorithmException e)
    {
    Toast.makeText(this, e.getMessage(), Toast.LENGTH_LONG).show();
    }
    }


    Credits go to

    http://stackoverflow.com/questions/4424492/facebook-sdk-for-android-example-app-wont-work.

    Regards,
    Michael

    REPLY

    Mario Romano says:
    11/05/2011


    Thank you :)

    REPLY

    Rocky says:
    13/05/2011


    I get the following error when I try "myStatus", setMyStatus, "myFacebookInfo", and "myFriend" examples:


    05-12 16:55:11.013: ERROR/AndroidRuntime(8023): Caused by: java.lang.NullPointerException
    05-12 16:55:11.013: ERROR/AndroidRuntime(8023): at com.easy.facebook.android.facebook.FBLoginManager.loginSuccess(FBLoginManager.java:82)

    It looks like the intent returned is NULL. Any suggestions? I'm testing on a Galaxy Tab...

    REPLY

    Mario Romano says:
    13/05/2011


    Do you have set Key hash in your facebook application?

    REPLY

    Rocky says:
    13/05/2011


    I do have the key has set up on facebook...when I test from my Droid 2 it works fine, but when I test from a Galaxy tab I get that error.

    REPLY

    Mario Romano says:
    13/05/2011


    The eclipse and the PC are always the same for droid 2 and galaxy tab?

    REPLY

    Rocky says:
    13/05/2011


    Yes, and both devices are running Android 2.2

    REPLY

    Mario Romano says:
    13/05/2011


    It's installed Facebook application in Galaxy tab ?

    REPLY

    Rocky says:
    13/05/2011


    Aha! You found the problem!!! That's it the Galaxy Tab did not have the Facebook app installed...as soon as I installed it everything started working. Thanks!!!

    Now, does this mean all users need the Facebook app installed in order to allow permissions to my app or is this specific to your API?

    Thanks for all your help and for putting together this awesome API!

    REPLY

    Mario Romano says:
    13/05/2011


    All users need the Facebook app installed in order to allow permissions to your app...this problem there is from 2.0 version of my api and in the official facebook api....my 1.0 to 1.3 api haven't this problem...unfortunatly this old version was less userfriendly and less secure

    REPLY

    Rocky says:
    14/05/2011


    I guess the official facebook api was updated; I just tested it and it doesn't require the facebook app to be installed. It pops up its own browser with the facebook login or permission dialog. Would you consider implementing that functionality on your api?

    REPLY

    Mario Romano says:
    14/05/2011


    I hope to release a new version with this feature this week end.

    REPLY

    Michael says:
    14/05/2011


    and please fix the posttofriends function as well so you can post to pages that have less posts than the limit.

    thanks,
    Michael

    REPLY

    Mario Romano says:
    14/05/2011


    Hi Michael can you tell me more about this issue?

    REPLY

    Michael says:
    14/05/2011


    Hi Mario,

    sorry. my issue is with getPostFriends and not with postToFriends.

    You can simply test:

    - create a page
    - dont post any posts or justa few
    - call getPostFriends(id, limit) where the limit is greater than the posts exist on the page

    Result: The call is in an endless loop.

    As of right now I would need to tell my users to not use the application if the page has less than limit posts. This would not be good.

    Would be great if you could check this.

    Thanks,
    Michael

    REPLY

    Mario Romano says:
    14/05/2011


    I have solved the bug of llimit post and problem of login without facebook app installed. Please , test the release 2.1 and then say to my your opnion .

    Thank you

    REPLY

    Michael says:
    14/05/2011


    As always, you are the MAN ! :-)

    Will test it over the weekend and let you know how it goes.

    Thanks again,
    Michael

    REPLY

    Mario Romano says:
    14/05/2011


    ;) thank you...Good weekend :)

    REPLY

    Michael says:
    16/05/2011


    Allright Man.

    I can only report good things. :-)

    This version is working well. Awesome stuff.

    Lets work on the iPhone port now. :-)

    Thanks,
    Michael

    REPLY

    Abid Naeem says:
    17/05/2011


    Hello, I am trying to integrate your SDK with my application but I am running in to issues. I have submitted log before but I have not heard anything. I would highly appreciate if you can assist me. I am getting for following error in your example setmystatus
    E/AndroidRuntime( 1057):
    java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=32665, result=-1, data=Intent { (has extras) }} to activity {com.example/com.example.FacebookConnect}: java.lang.NullPointerException E/AndroidRuntime( 1057): at android.app.ActivityThread.deliverResults(ActivityThread.java:2532) E/AndroidRuntime( 1057): at android.app.ActivityThread.handleSendResult(ActivityThread.java:2574) E/AndroidRuntime( 1057): at android.app.ActivityThread.access$2000(ActivityThread.java:117) E/AndroidRuntime( 1057): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:961) E/AndroidRuntime( 1057):

    I have set hash key with following

    keytool -export -alias androiddebugkey -keystore ~/.android/debug.keystore | openssl sha1 -binary | openssl base64 note that -exportcert

    give me illegal option error. Also I have substituted facebook application id with application ID from facebook and not API key. I am testing on nexus s 2.3.4 I have tested with JAR ver 2.1 and 2.0 same error on both Waiting for your reply Abid.

    REPLY

    Eugenio Romano says:
    17/05/2011


    Try to generate Key Hash with this tool http://www.easyfacebookandroidsdk.com/download/keyhash.zip

    REPLY

    Abid Naeem says:
    17/05/2011


    Great it works now...thank you so much for your help. LOVE your SDK Good job =)

    REPLY

    bodydoc says:
    17/05/2011


    I have same problem but doesnt work after key hash. I mean still not working :( same error. Strange thing is that its working on emulator, but after downloading apk on my S7 with 2.1-upgrade1 and my HTC with 2.2.1 got only FORCE CLOSE!

    REPLY

    ooishi says:
    18/05/2011


    So, this error is caused by an invalid key hash?

    REPLY

    Mario Romano says:
    18/05/2011


    Yes...recheck key hash with tool in guide page of this site.

    REPLY

    bodydoc says:
    18/05/2011


    Hey guys. I've got this error:
    Exception class java.lang.NullPointerException
    Source method URLDecoder.decode()

    java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=32665, result=-1, data=Intent { (has extras) }}

    Help pls. Its not from key hash. Like google says its from URLDecoder.decode().

    REPLY

    bodydoc says:
    18/05/2011


    Ok.. dont get it. Everything runs fine on emulator. Everything runs fine on my tablet/phone when i directly debug/compile application from Eclipse. But when i export package and download it on device -> ERROR!

    REPLY

    Eugenio Romano says:
    18/05/2011


    You have to regenerate Key hash if you export project as .apk file

    REPLY

    bodydoc says:
    18/05/2011


    @Eugenio Romano God bless YOU my friend! It works! :D Thank you so much.

    REPLY

    Waqas says:
    28/05/2011


    Hi , I have setup up facebook graph api for android , that was working on my Emulator and on my device without hash key , but when i put the app on android market , my client download the app on his android cell , he does not able to connect with facebook . It ask for login but nothing happen after putting credentials . I think the problem is in the hash key section , so i put the hash key in the mobile device section on my facebook app but i m confused b/t debug.keystore or blah.keystore .... Since every where on the net , hash key is generate by debug.keystore , my question is that , do i need to generate hash key with debug.keystore or for eg blah.keystore(keystore which is use to signed my apk file for android market) so that i can connect with facebook on other devices .

    REPLY

    Mario Romano says:
    28/05/2011


    Use keystore of your apk file for android market

    REPLY

    ooishi says:
    28/05/2011


    I'm having an error with a code similar to the keyhash one, but I know it's not keyhash related because I see my installs number go up in the facebook insight thing...

    Exception class
    java.lang.NullPointerException
    Source method
    FBLoginManager.loginSuccess()

    java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=32665, result=0, data=null} to activity {com.eden.statusphere/com.package.ooishi.FacebookConnect}: java.lang.NullPointerException

    any ideas?

    REPLY

    Mario Romano says:
    31/05/2011


    If you debug your app eith eclipse , try to generate Key Hash with this tool http://www.easyfacebookandroidsdk.com/download/keyhash.zip

    REPLY

    ooishi says:
    31/05/2011


    Thank you for the reply, I have both keyhashes entered, but the error does not occur in debug mode, only from a few users who downloaded it in the marketplace... it seems to be similar to the issue Rocky experienced above.

    REPLY

    Mario Romano says:
    31/05/2011


    If you export project as .apk file you must regenerate Key hash from new file.keyStore

    REPLY

    Goutom says:
    06/06/2011


    Hello All

    Now I am trying to integrate facebook in my android application.I have a text box and a button named "share" in my application.I will write something in the text box and will press button "share", then a facebook login form will come and after entering the username and password it will post the status in my facebook account.I am using easy facebook android sdk.Can some one show me any tutorial which dose same?

    Regards
    Goutom

    REPLY

    Eugenio Romano says:
    07/06/2011


    You can download set status example from demo page.

    REPLY

    Nayanesh Gupte says:
    06/06/2011


    Logout doesn't work properly so next time it doest show login as i remain in login state.

    DEBUG/Facebook-Util(5619): GET URL: https://api.facebook.com/restserver.php?method=auth.expireSession&access_token=(access_token)


    WARN/System.err(5619): org.json.JSONException: A JSONObject text must begin with '{' at character 1 of true

    WARN/System.err(5619): at com.easy.facebook.android.facebook.FBLoginManager.logout(FBLoginManager.java:175)

    how do i solve this?

    REPLY

    Mario Romano says:
    06/06/2011


    There is a bug with logout method...I hope to resolve it in the next release

    REPLY

    Luqman Hakim says:
    08/06/2011


    anyone have try this sdk on dell streak?
    why this sdk always force closed on dell streak but running well one other device?

    REPLY

    Mario Romano says:
    08/06/2011


    There is facebbok App installed on this device?

    REPLY

    Luqman Hakim says:
    08/06/2011


    yes, facebook app installed
    after login page appear login progress after that always force close
    i have tray all demo app and all demo force closed

    REPLY

    Mario Romano says:
    08/06/2011


    What version of Android is installed?

    REPLY

    Luqman Hakim says:
    08/06/2011


    Dell Streak 5
    official rom Android 2.2.2

    REPLY

    Mario Romano says:
    08/06/2011


    Do you have export this app in an .apk file or you using eclipse to run it?

    REPLY

    Nayanesh Gupte says:
    08/06/2011


    Its working on dell streak as well on my galaxy tab and galaxy 3 but with facebook app installed it doesn't ask for login instead it is using existing credentials?

    what if i dont want this way in my app?

    REPLY

    Eugenio Romano says:
    08/06/2011


    You can modify code of library to force it to display a popup login.

    REPLY

    Tayyab Javed says:
    13/06/2011


    Hey, can i use this library to operate facebook from inside of android service? So that it can run in the background and my main activity is not blocked by it.

    REPLY

    Tayyab Javed says:
    15/06/2011


    one more question, how can a delete a post?

    REPLY

    Mario Romano says:
    15/06/2011


    Not is possible

    REPLY

    Giulio Prisco says:
    20/06/2011


    Great SDK - I have only been testing it for a few minutes but I can already see that this can be of great help to many Android developers looking for a fast and easy way to integrate Facebook in their apps. Recommended.

    Complimenti Mario e Eugenio, bellissimo lavoro, e mi fa piacere vedere che la Federico II continua a produrre grandi.

    REPLY

    Mario Romano says:
    20/06/2011


    Thank you Giulio

    troppo gentile :)

    REPLY

    Shaun Walsh says:
    24/06/2011


    Great API, SOOOO much better than facebooks official, its working very well with what im doing with it. I do have a quesetion though. Is it possible to post to a friends wall without them excepting your app. Im not trying to spam, im just trying to make it so I can post through my own app to my friends instead of through the official app. Is this possible?

    REPLY

    Eugenio Romano says:
    24/06/2011


    It's possible , you have to add a right permission . Add this perissons in the permissions array : "read_stream","publish_stream","offline_access" .

    REPLY

    Shaun Walsh says:
    25/06/2011


    That didnt work for me, any other suggestions? Heres the code

    public void onItemClick(AdapterView<?> arg0, View arg1, int position, long arg3) {
    final Dialog dialog = new Dialog(this);
    dialog.setContentView(R.layout.message);
    Friend f = friends.get(position);
    final String id = f.id;
    dialog.setTitle(id);
    dialog.setCancelable(true);

    final TextView text = (TextView) dialog.findViewById(R.id.message);

    Button cancel = (Button) dialog.findViewById(R.id.cancel);
    cancel.setOnClickListener(new OnClickListener() {
    @Override
    public void onClick(View arg0) {
    dialog.dismiss();
    }
    });

    Button send = (Button) dialog.findViewById(R.id.send);
    send.setOnClickListener(new OnClickListener() {
    @Override
    public void onClick(View arg0) {
    try {
    graphApi.postToFriend(text.getText().toString(), id);
    fbManager.displayToast("Posted!");
    } catch (EasyFacebookError e) {
    e.printStackTrace();
    fbManager.displayToast("Posting failed! " + e.toString());
    }
    dialog.dismiss();
    }
    });
    dialog.show();
    }

    REPLY

    Eugenio Romano says:
    25/06/2011


    Where is inizialization of graphApi?

    REPLY

    Shaun Walsh says:
    26/06/2011


    Its there, just not in that segment of code. Its globally initialized.

    REPLY

    Eugenio Romano says:
    26/06/2011


    If I don't look code and stack trace error , I can't help you

    REPLY

    Shaun Walsh says:
    26/06/2011


    Its not crashing or anything, it just states that Its unable to post to a users page unless they authorize the app.

    REPLY

    Eugenio Romano says:
    27/06/2011


    I need look code.

    REPLY

    Paul Johnson says:
    24/06/2011


    Hello,

    I like your api, but I am having issues using it in a widget. The connect method needs a view, which it returns to. This is not good for a widget. Any ideas?

    Paul

    REPLY

    Mario Romano says:
    24/06/2011


    No , to do a facebook login a View it is needed

    REPLY

    red says:
    26/06/2011


    Hi
    Would you tell me if there is a way to retrieve current inbox messages and how to register tp listen for new ones. Thank you. Very much

    REPLY

    Mario Romano says:
    27/06/2011


    You can use GraphApi.getInBoxMy() method to retreive inbox message , but there isn't listener sorry.

    REPLY

    anas jaber says:
    27/06/2011


    very beautiful library i need this library for huge project...

    REPLY

    Mario Romano says:
    27/06/2011


    do you need help?

    REPLY

    anas jaber says:
    28/06/2011


    thank you mario I need some help in pictures uploader and tags on pictures
    I will ask you some questions about these topics
    I need your email if available

    REPLY

    Mario Romano says:
    28/06/2011


    You can send me an email using contact page

    REPLY

    red says:
    28/06/2011


    Mario, thank you for your reply. I learn that the graph api has realtime update support. Is there a way to access this feature using the sdk so that I may receive update from facebook? If not then I could implement some method of polling but I would need some kind of "since last poll time" support in order to query for just messages from the last poll time. Would the sdk already had this support built in?

    thank you for your help.

    REPLY

    Mario Romano says:
    28/06/2011


    no , your idea of pollig it's good.

    REPLY

    aziz says:
    06/07/2011


    hi! i just try to make an android app which is supposed to connect several socilal network and get friend status and friends other share from there and show them in special design frame. but i dont know how to connect facebook without using facebook coonection page. i mean i wanna write a code like

    Editbox username, password;

    Button blogin=(Button)findViewById(R.id.login);

    username=(EditText)findViewById(R.id.username);

    password=(EditText)findViewById(R.id.password);

    loginb.setOnClickListener(new OnClickListener() {

    @SuppressWarnings("deprecation")
    public void onClick(View v) {
    login(username.getText().toString(), password.getText().toString());


    }
    });

    REPLY

    Mario Romano says:
    06/07/2011


    not is possible

    REPLY

    aziz says:
    07/07/2011


    thanks mario it realy help me. at least learning there is no way to connect facebook in my desire make me avoid searching how to manage that issue.

    REPLY

    Red says:
    09/07/2011


    would anybody know how to search for public posts given a search string? I tried to use FQL query with a "LIKE %search_str%" but that didn't work. It seems like 'LIKE' is not a supported key word.

    Thank you for your help

    REPLY

    Erick says:
    03/08/2011


    Hi,

    I would like to know if it is possible to upload/post videos using this API? I used the official API but I didn't have any luck.
    Thanks in advance!

    REPLY

    Mario Romao says:
    06/08/2011


    No. .. we are working to develop this functionality

    REPLY

    Sanket Bafna says:
    07/08/2011


    I tried the newest version i.e 2.2 to update status via my app. It runs very well in emulator but in real device it force closed every time. I think this is due to my emulator is not having the original Facebook app though my phone have it.

    I am getting Null Pointer exception. I am unable to Login.

    REPLY

    Mario Romano says:
    08/08/2011


    Try to generate Key Hash with this tool on your device...http://www.easyfacebookandroidsdk.com/download/keyhash.zip....i think you are still using debug.key...

    REPLY

    Pratik says:
    26/08/2011


    Hi there.....its such a nice for FB Integration. But I want to load whole facebook page in my application. I am new in android so please can anyone help me. In my application if I press friends,photos,notification etc... icon then it will be reflect into facebook page. So first I just want to know how to load whole facebook page on android device.......Thanks in Advance

    REPLY

    Mario Romao says:
    26/08/2011


    You can use GraphApi.getHome() method

    REPLY

    Munish Kapoor says:
    22/09/2011


    Hi Mario Romano,
    I have used the easyfacbook sdk.
    but the problem is it's run fine on my device when I install the apk to another android device it's generate the force close error. can you tell me what's the problem.
    Thanks,
    Munish

    REPLY

    Mario Romano says:
    22/09/2011


    Du you have change KeyHash of debug.keystore with keystore ok your .apk?

    REPLY

    Munish Kapoor says:
    27/09/2011


    HI Mario
    Thanks for your response.
    can you tell me how to use access token i want to get user email and it's birthdate
    Thanks,
    Munish

    REPLY

    Mario Romano says:
    27/09/2011


    Try to use GraphApi.getUserInfo() method . You don't need manage accessToken ,the library do it.

    REPLY

    Munish Kapoor says:
    27/09/2011


    Thanks Mario Romano

    REPLY

    naveen says:
    22/09/2011


    Hi ,
    I am new to the android. Where i down load the easyfacebook source code .Can you help me...

    REPLY

    Mario Romano says:
    22/09/2011


    Click on download in the top of this page...

    REPLY

    harsha says:
    26/09/2011


    hi Mario,

    I have added the link you specified in site-URL also generated the hash key and pasted it but still I am getting the login failed error !! Can you help me out in this

    REPLY

    Mario Romano says:
    26/09/2011


    Try to use easyfacebookandroidsdk_2.2.jar

    REPLY

    harsha says:
    27/09/2011


    Hi again,

    As you said I used the 2.2 version but still I am getting the same "Login Failed" Toast. I used your has key generator program, could that be giving any problem ?? Waiting for your reply

    Thank you

    REPLY

    Mario Romano says:
    27/09/2011


    Do you have execute app in to eclipse?

    REPLY

    root.node says:
    27/09/2011


    Hi Romano,

    I am getting the problem "Login Failed" toast,

    1) I have changed the site URL to http://www.easyfacebookandroidsdk.com/accesstokenpage/ in the website section.

    2) Key is also generated properly (I entered the password 'android')

    3) I used easyfacebookandroidsdk_2.2.jar also

    4) As soon as I click Allow buttton it will show me Login Failed

    Does the facebook server take some time to update changes or something ?
    Can you please hekp to to get rid out of this

    thank you

    REPLY

    Mario Romano says:
    27/09/2011


    If you use easyfacebookandroidsdk_2.2.jar URL not needed.
    Try to do it :
    1)Download an example from demo page
    2)Generete Key Hash from your debug.keystore
    3)Insert accessToken in your facebook application settting page.
    4)Put you FacebookApplication ID in downloaded example
    5)RUN IT

    REPLY

    root.node says:
    27/09/2011


    hi mario,

    Access token means the hash key generated from debug.keystore nah or is it different ?

    Thank you

    REPLY

    Mario Romano says:
    27/09/2011


    It's 2 different things

    REPLY

    root.node says:
    27/09/2011


    ohh then how to get the access token ?

    thank you

    REPLY

    Mario Romano says:
    27/09/2011


    you not need access token with this library

    REPLY

    Alex Schilcher says:
    28/09/2011


    is as Tayyab already asked ... br, Alex


    Tayyab Javed says:
    13/06/2011

    Hey, can i use this library to operate facebook from inside of android service? So that it can run in the background and my main activity is not blocked by it.

    REPLY

    Mario Romano says:
    29/09/2011


    Yes , but the user must first allow your application to access the her data

    REPLY

    Alex Schilcher says:
    29/09/2011


    >Yes , but the user must first allow your application to access the her data

    - use the "FBLoginManager" for the activity (GUI) style
    - use the "FBLoginWithOutApi" for the service

    ... right?

    btw: many, many thx for the great LGPL api!!!!!!!

    br,
    alex

    REPLY

    Mario Romano says:
    29/09/2011


    Not is right....

    - FBLoginManager it's a manager of login/logout and session action
    - FBLoginWithOutApi it's a magaer of login for the phone where facebook app not is installed

    Thank you

    REPLY

    Alex Schilcher says:
    30/09/2011


    hmmm...

    fbloginmanager requires an activity as param, so imho the fbloginmanager is only running when the activity has the focus

    how can i start your framework as a service which fetches the fb-content out of the background?

    thx & br

    REPLY

    Mario Romano says:
    01/10/2011


    Not is possible!The the user must first allow your application to access the her data from an activity

    REPLY

    Munish Kapoor says:
    03/10/2011


    Hello Mario,
    I have got one bug.
    I have used the FQL to get the loged in user information.
    when I log out using facebook app and log in with new facebook user then it shows me the previous user information not new user information.
    Thanks,
    Munish

    REPLY

    Pratik says:
    10/10/2011


    Hi Mario...I am confused to use facebook api in my application...I am developing one application in it I need to fetch feed,friends,notifications,messages etc...means most of the features of facebook and need to display in custom design...but I am confused that how to fetch the data...can u please help me and could u suggest me some sample code.....thanx

    REPLY

    Mario Romano says:
    10/10/2011


    Try with example in demo page....

    REPLY

    Pratik says:
    10/10/2011


    Thanx for your reply Mario....Yeah I tried but basically where to start that I can't understand...for example, I wanna fetch feed , so how can I do that??? can u please explain me????

    REPLY

    Mario Romano says:
    11/10/2011


    If you want fetch feed use GraphApi.getAllPostMy() or GraphApi.getPostFriends(java.lang.String friendID, int limitPost) to get all feed of your friends...

    REPLY

    Pratik says:
    11/10/2011


    Hi Mario I referred SDK of EasyFacebook where I found some classes like Feed,Friends etc..but its always returns null value when I call some methods of it.....Here is my code for it....

    Feed feed = new Feed();
    String str=feed.getPicture();
    String time=feed.getCreated_time();
    Log.d("time",time);
    Log.d("picture",str);

    Can you please help me to find the problem.....thanx

    REPLY

    Mario Romano says:
    11/10/2011


    Try an example from demo page....run it....and let me know if example run correctly

    REPLY

    Jason says:
    20/10/2011


    Hello. The login process is crashing when the Facebook app is installed with EasyFaceBookSDK. Does this have something to do with the whole "one-click authentication" that facebook is trying to do?

    I read up on Stackoverflow that it could be related to the key not being updated on all of the servers and that it appeared to resolve itself after a few days.

    I know my key is right (or atleast I think it is right) because I can login to facebook -- as long as the facebook app is not installed (using the newest version).

    I've tried both easyfacebookandroidsdk_2.2.jar and easyfacebookandroidsdk_2.1.jar and the login method is taken directly from the guide section.

    Otherwise, making GraphAPI calls on this is 1000% easier than using the facebook sdk. I got this up and running in less than 30 minutes -- after spending over 3 hours struggling with the official sdk.

    REPLY

    Mario Romano says:
    20/10/2011


    Thanks Jason,

    the official library is very bad ....
    I do not understand why Facebook does not use my library:) I give it for free on my device ...
    however I've installed the Facebook application and I haven't problem with the login.

    REPLY

    Jason says:
    24/10/2011


    Turns out it was a problem with the key hash after all. I don't know why facebook made it so hard. I signed the apk, followed their instructions, even downloading OpenSSL, and it was giving me the wrong keyhash. So I downloaded the link you supplied earlier (http://www.easyfacebookandroidsdk.com/download/keyhash.zip) and exported and signed it using the keystore that I signed the apk file with and it gave me the correct keyhash for that keystore.

    Facebook really shouldn't make it that hard...

    REPLY

    Lawrence says:
    26/10/2011


    Hi

    I am having an error when using this SDK. I integrated it into my application but there was an error when using Single Sign On.

    Any ideas?

    Thanks

    REPLY

    Mario Romano says:
    27/10/2011


    verificate your key hash , and regenerate with tool in this page : http://www.easyfacebookandroidsdk.com/guide.asp

    REPLY

    Abdurrahman says:
    27/10/2011


    Ur api really rocks, I just wanted to know how I can for example extract the user's interests ...i'm stuck trying to do this... I hope u guys can help me out ! thanks a lot !!

    REPLY

    Eugenio Romano says:
    27/10/2011


    Read previous post , We have already answered this question

    REPLY

    Alex Schilcher says:
    27/10/2011


    hi,

    now i'm working quite a while with the easyfacebook and it supereasy and perfekt!!! - THX!!!
    the only thing that i've mentioned is that the progressbar during a FQL query stops cyclling (like it has crashed).
    the FQL query is working as expected, but for the enduser it's a bit weird ... is this a known/correct behaviour; fix possible?

    br,
    alex

    User usr = graphApi.getUserInfo("23523");
    URL img_url = new URL(fql.getFriend("63434634").getPic());
    Bitmap bitmap = BitmapFactory.decodeStream(img_url.openConnection().getInputStream());

    REPLY

    Eugenio Romano says:
    27/10/2011


    What do you expect after the closing of the progress bar?

    REPLY

    Munish Kapoor says:
    28/10/2011


    HI Mario,
    How can i upload the photo from device.
    is this correct?

    GraphApi gp=new GraphApi(facebook);
    gp.uploadPhoto("nice", "/sdcard/poland.jpg");

    Thanks,
    Munish

    REPLY

    Mario Romano says:
    21/11/2011


    no...if you want upload photo from your sdcard, you need first put him in a byte array...then change method uploadPhoto from (String , String) to (String, byte[]) and put your byte array in params.putByteArray...

    REPLY

    Carlos says:
    09/05/2013


    Hi Mario.

    I'm trying this but i am unable to. Can you do a more detailed explanation?

    Thanks and excellent work

    REPLY

    Alex Schilcher says:
    28/10/2011


    i only use the FacebookActivity to fetch the userdata within the "loginSuccess" method.
    i'm using the graphApi and FQL to get user-data from several users (up to 10 users - pls see the 3 codelines above). getting data via 3G network needs quite some time, so the progressbar for the enduser is perfect. at the beginning the progressbar is cycling, but when i get to the FQL query the progressbar stops after the 1st FQL-query ... so it looks like that the program has stopped while fetching data for the remaining-users (fetching data is successful, but the progressbar stopped cycling).
    after i got the data i stop the activity with this.finish()

    another question:
    i created a facebook-testaccount (FbID=100002115754179) where i added the string "easyfacebook testentry" in the about-me dialog. when i query the userinfo (graphApi.getUserInfo("100002115754179") i should see in the about-property the teststring! ... i do get the name, gender, etc. but i don't get any infos in the "About"

    ... i use:
    String permissions[] = { "read_stream", "user_relationship_details", "user_religion_politics", "user_work_history", "user_relationships", "user_interests", "user_likes", "user_location", "user_hometown", "user_education_history", "user_activities", "offline_access" };

    br,
    alex

    REPLY

    Mario Romano says:
    21/11/2011


    1 - I think you need put you call to Graph and FQL api in a thread
    2 - Your code it's right..i don't know, try with other account

    REPLY

    Munish says:
    29/10/2011


    Hi Mario,

    I want to get the my friends birthdate.
    I have used the following code.

    String permissions[] = {"read_friendlists","friends_birthday","read_stream","offline_access"};
    select uid,name,pic,birthday_date from user where uid in (select uid2 from friend where uid1=me())

    I have also used the graphApi but still return null
    but it returns the following xml response.
    <birthday_date xsi:nil="true">
    please tell me how can i get the birthdate.
    Its urgent.
    Thanks,
    Munish

    REPLY

    Mario Romano says:
    21/11/2011


    Use GraphApi.getUserInfo.getBirthday()

    REPLY

    Paul says:
    30/10/2011


    Hi,

    when calling GraphApi.getHome(xx) - I get an exception: JSONException: No value for id, GraphApi.getHomeCall(GraphApi.java:995). Apparently this happens when json.getString("id") is called. The same code was working fine 2 days ago - does anyone know where the problem is? Or did facebook change something on their servers?

    Thanks!

    REPLY

    Mario Romano says:
    21/11/2011


    I debugged now this function and work fine....you are sure your Home it's public?

    REPLY

    Paul says:
    21/11/2011


    Hi,

    right after I posted this question I found out changing the number of requested homes fixes the problem.. it was pretty strange behavior, but apparently it's working now. Thank you for your time and this awesome sdk :)

    Paul

    REPLY

    Alex Schilcher says:
    17/11/2011


    hi,

    since you haven't replied to my last post, i hope everthings ok?! ...

    i tried to modify your lib so that the ProgressBar spinner won't stop during all the GraphApi and FQL querys (out of the "public void loginSuccess(Facebook facebook)" context). IMHO i think that when you call the "loginSuccess" and "FbManger.login" out of the Thread-Handler you loose the backgroundcontext and during the FQL queries (which take some time) the progressbar-spinner stops.
    attached please find my modifications in the "LoggedInThread" ....

    public class LoggedInThread implements Runnable
    {
    private FBLoginManager fbManager;
    private LoginListener callback;
    private Activity activity;
    private Facebook facebook;


    public LoggedInThread(FBLoginManager fbManager, int returnWindow, LoginListener callback, Activity activity)
    {
    this.fbManager = fbManager;
    this.callback = callback;
    this.activity = activity;
    }

    public void LoggedIn()
    {
    ProgressDialog dialog = new ProgressDialog(this);
    dialog.setCancelable(true);
    dialog.setMessage("Connect to Facebook ...");
    dialog.setIndeterminate(true);
    dialog.show();

    Thread thread = new Thread(this);
    thread.start();
    }

    public void run()
    {
    SharedPreferences preferences = activity.getSharedPreferences(fbManager.getAppID(), 0);
    String accessToken = preferences.getString("accessToken", "");
    facebook = new Facebook(fbManager, fbManager.getAppID(), accessToken);

    if (facebook.sessionIsValid())
    ((LoginListener) callback).loginSuccess(facebook);
    else
    fbManager.login();
    }
    }


    -> what do you think about this?!

    br,
    alex

    REPLY

    Mario Romano says:
    21/11/2011


    I think your code don't work fine....However in the next release i will resolve this issue...

    REPLY

    white8824 says:
    23/11/2011


    Hi Mario
    I import setMyStatus2.1 and run it on my computer ,and it is okay.But when I execute this on my phone,it has error when login and then forced to close. What's the problem ? Or should I do another things to let my phone run it correctly? Please help me solve this THX:))

    REPLY

    Mario Romano says:
    23/11/2011


    Read previous post , We have already answered this question

    REPLY

    Timo Drick says:
    27/11/2011


    Hey my first impression on easy facebook sdk is very good. Many things i need to do took me many days but with easy facebook it took only few minutes. Very beautiful API.

    I would like to use it but it would be nice if you are able to provide an readonly git repository to get the sources. It is terrible to extract the sources from the jar files.

    Yea your sdk is cool but it do not solve all problems so i have to extend it. Sure i am willing to put this back to the project. Without a repository system this is not possible. Not even possible to generate a reasonable diff.

    REPLY

    Mario Romano says:
    03/12/2011


    Hi Timo

    Jar file don't is the hell , it's only a compressed file. However you are right....I will thinking on.
    If you want send me your update , you can send me a private message from contact page , and I will reply to you with my personal email.

    Thank you

    REPLY

    Roy says:
    01/12/2011


    Hi, is it possible to send a message to a friend's inbox using the SDK?

    REPLY

    Mario Romano says:
    03/12/2011


    not yet, the inbox functionality is still in beta...

    REPLY

    Andrew says:
    02/12/2011


    Hi Mario,

    Thanks for the facebooksdk library
    Im using your library in my app an it works good.

    I have a question..
    Is there a version of the library where it looks more like android native? and it wont go to the internet.

    thanks in advance,

    Andrew

    REPLY

    Mario Romano says:
    03/12/2011


    Hi Andrek

    Can I Know the name of your app on the Market?

    I did not understand what you mean ... you mean to login?

    REPLY

    Munish Kapoor says:
    02/12/2011


    Hi Mario,
    Thanks for the nice API
    I have published my new app by using you api.

    https://market.android.com/details?id=com.post.ticker&feature=search_result#?t=W251bGwsMSwxLDEsImNvbS5wb3N0LnRpY2tlciJd

    Thanks,
    Munish

    REPLY

    Mario Romano says:
    03/12/2011


    HI Munish

    I have downloaded your App , It's very interesting. Good job.

    Thank you for telling me

    REPLY

    Munish says:
    04/12/2011


    Thanks Mario

    REPLY

    Manish Srivastava says:
    06/02/2012


    Hi,

    I am using easyfacebook to connect facebook in my app.
    it works good but some time when i logged out through facebook app , and try to connect facebook through my app it throughs an "null pointer exception" in onActivityResult() method in my activity.

    please help me !!!

    Thanks
    Manish

    REPLY

    Mario Romano says:
    06/02/2012


    it's a bug...i hope to resolve that in next release....

    REPLY

    raam says:
    26/03/2013


    Nice jar file. Easy to setup everything works as expected but there are two things:

    1. How do I logout from Facebook?
    2. If I have fb app and I open my app which has fb integration I don't get the permission to install instead I get my app name is misconfigured for fb login. How to fix this up? I tried this both set status and get status. ( I get the permission perfectly if I don't install the default fb app on my phone.)

    Can you please help to fix this issue?

    Thanks!

    REPLY

    rix chow says:
    14/04/2013


    hi
    i am using easyfacebookconnect in my project, it's easy to use and have help me a lot,
    i'm still new with this, so i have this case,
    i want to get user account info after login
    how can i do this, if the case, the user have login in my application before

    if (fbManager.existsSavedFacebook()) {
    fbManager.loadFacebook();
    //i want to get user name here
    } else {
    fbManager.login();
    }

    REPLY

    Diego Quinteros says:
    18/07/2013


    You are just awesome!

    REPLY

    Daniel Diesenreither says:
    31/10/2013


    First thanks for this guys.

    But i dont get my Logout working.

    Has someone an example logout or a tutorial for it ?

    Would be nice, ty

    Best regards, Daniel

    REPLY

    Hardik says:
    04/01/2014


    Great work! I like it very much.

    REPLY

    Mayur says:
    22/01/2014


    Hi,

    Thanks for the sdk. Its quiet simple to use.
    That said, Im getting a Null Pointer exception within Util class at encodeUrl. URLEncoder.encode function is deprecated. Can you look into this?

    REPLY

Leave Comment