Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

in Android, what is the easiest way to get ones Friend's birthdays? Or relationship status? Using FQL or by requesting it via the Facebook API SDK for Android?

Thanks.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
259 views
Welcome To Ask or Share your Answers For Others

1 Answer

 Bundle params = new Bundle();
 params.putString("fields","birthday");
 JSONObject jObject1 = new JSONObject(authenticatedFacebook.request("me/friends",params));     

Now if you print the jobject1 you will get the all your friends birthday list..

The response will be in JSON format you have to get the value from it..

authenticatedFacebook is you object for Facebook..

For further clarification you check in this link.....

private static final String[] PERMISSIONS =
    new String[] {"friends_birthday","read_stream", "offline_access"};

Make sure that you gave permission for accessing friends Birthday date..


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...