Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Facebook friends birthdays in Android

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.

like image 370
user584513 Avatar asked Dec 10 '22 10:12

user584513


1 Answers

 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..

like image 57
Venky Avatar answered Dec 23 '22 15:12

Venky