如何獲得用戶生日user.getBirthday()
?如何從facebook sdk獲取用戶生日?
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 /me API
Request.executeMeRequestAsync(session, new Request.GraphUserCallback() {
// callback after Graph API response with user object
@Override
public void onCompleted(GraphUser user, Response response) {
if (user != null) {
TextView welcome = (TextView) findViewById(R.id.textView1);
welcome.setText("Hello " + user.getBirthday() + "!");
Log.d("user_birthday","user_birthday:"+user.getBirthday());//user.getBirthday() this value always is null?
}
}
});
}
}
});
嗨,我該如何設置權限?你能展示例子嗎? – user2185544 2013-03-19 09:31:18
@ user2185544請參閱我編輯的答案:) – 2013-03-19 09:40:59
什麼是authbutton? – 2014-12-01 15:46:45