在我的应用程序中,我正在获取即将到来的生日列表,但面临一个小问题,没有在列表中获取当前日期 b'days,请参阅我编写的代码以获取即将到来的生日:
public static void requestFriends(FacebookRequest facebookRequest)
{
Log.d(LOG_TAG, "requestFriends(" + ")");
// ----- [start]to get all upcoming birthdays using Variables -----
Calendar cal = Calendar.getInstance();
Date today = cal.getTime();
SimpleDateFormat formatter = new SimpleDateFormat("MM/dd");
String today_formatted = formatter.format(today);
String query = "select name, birthday, uid, pic_square FROM user " +
"WHERE uid in (SELECT uid2 FROM friend WHERE uid1 = me()) AND birthday_date != 'null' " +
"AND birthday_date >= '" + today_formatted + "'ORDER BY birthday_date ASC";
// ----- [end]to get all upcoming birthdays using Variables -----
Bundle params = new Bundle();
params.putString("method", "fql.query");
params.putString("query", query);
FacebookUtility.asyncRunner.request(null, params, new FacebookRequestListener(FacebookRequestListener.FRIENDS, facebookRequest));
}
所以告诉我我在哪里失踪,我不知道如何在列表中获取今天的生日....