I'm working on application which need birth dates of all friends. Can some body share code how to get birth dates of all friends using graph API. I'm using following code:
// start Facebook Login
Session.openActiveSession(this, true, new Session.StatusCallback() {
// callback when session changes state
@Override
public void call(Session session, SessionState state, Exception exception) {
if (session.isOpened()) {
// make request to the
Request.executeMyFriendsRequestAsync(session, new Request.GraphUserListCallback() {
@Override
public void onCompleted(List<GraphUser> users, Response response) {
//Log.d("AL",""+users.size() + response.toString());
for (int i=0;i<users.size();i++){
Log.d("AL",""+users.get(i).toString());
welcome.setText("Done");
}
}
});
}
}
});
And this is only returning friends name and id only. Where I have to set permissions to get friends birthday? I'm new in facebook SDK. And using SDK v3.
graph api is returning following json result
{Response: responseCode: 200, graphObject: GraphObject{graphObjectClass=GraphObject, state={"data":[{"id":"1580811776","name":"Jamal Abdul Nasir"},{"id":"1610349118","name":"Ahmed Nawaz"}],"paging":{"next":"https:\/\/graph.facebook.com\/100004790803061\/friends?format=json&access_token=AAABtTr8g5U4BANiJdCiBFxQeg0l1eqYYzmSWVM8G1UlyAhTtUrAsoEZAgU19dECXTE2nw7pHIz8bDb7OJGM4wAwzusOVZAQN8yaiYVsQZDZD&limit=5000&offset=5000&__after_id=1610349118"}}}, error: null, isFromCache:false}
which does not have birthday.