4

私はFacebookのAndroidアプリケーションを書いています.Facebookの友達のリストを今月の誕生日に表示したいのですが、以下のコードを使ってそれを取得しています:-

    public static void requestFriends(FacebookRequest facebookRequest) 
    {
    Log.d(LOG_TAG, "requestFriends(" + ")");

    Calendar c = Calendar.getInstance();
    int month = c.get(Calendar.MONTH) + 1;
    String query = "select name, birthday, uid, pic_square from user where uid in (select uid2 from friend where uid1=me())AND birthday_date >= '" + month+ "/01' AND birthday_date <= '" + month+ "/31' ORDER BY birthday_date ASC";

    Bundle params = new Bundle();
    params.putString("method", "fql.query");
    params.putString("query", query);
    FacebookUtility.asyncRunner.request(null, params, 
    new FacebookRequestListener(FacebookRequestListener.FRIENDS, facebookRequest));
}

アプリケーションを実行するたびにデータが取得されませんが、2 月に 3 人の友人の誕生日がありますが、それらの誕生日は取得されません。

私のログキャットは言う:-

02-18 16:14:39.918: I/Choreographer(978): Skipped 78 frames!  The application may be doing too much work on its main thread.
02-18 16:14:39.918: W/Trace(978): Unexpected value from nativeGetEnabledTags: 0
02-18 16:14:39.928: W/Trace(978): Unexpected value from nativeGetEnabledTags: 0
02-18 16:14:40.078: W/Trace(978): Unexpected value from nativeGetEnabledTags: 0
02-18 16:14:40.078: W/Trace(978): Unexpected value from nativeGetEnabledTags: 0
02-18 16:14:40.108: W/Trace(978): Unexpected value from nativeGetEnabledTags: 0
02-18 16:14:40.108: W/Trace(978): Unexpected value from nativeGetEnabledTags: 0
02-18 16:14:40.148: W/Trace(978): Unexpected value from nativeGetEnabledTags: 0
02-18 16:14:40.148: W/Trace(978): Unexpected value from nativeGetEnabledTags: 0
02-18 16:14:40.188: I/FacebookUtility(978): LoginListener onComplete Bundle[{access_token=AAAF2qLBdroMBAGZBbot29pzoZAKbOWJkK5GDIxUCz8g0IFnhCO9yclfHevmvZCFJ4ObQSH0aY055x6ILPbFgSuqVjl7EaWYo4MKbLb8BgZDZD, expires_in=5164038, code=AQDqK2l6gUcRILPfFl87Z290PhZQfDhmQValGvFU77bqbnM91wOtcI3MMIL-Usvs49XDVlnbnjZ_mNiPn9a6-CC11rY2Z-aUTb0yz8S6IophHApQstnfnK9mCJNI_BwGsYyyvv9pZ3gbaGSC5IHpryzatZyZGnBlvo5CZXg6h_drmgd6Gfe6e4akqXWJsnSsXUe4ion-jUysuniGNu3Bnbp7}]
02-18 16:14:40.188: D/Facebook Friends(978): onLoginResultReceived(0)
02-18 16:14:40.218: D/FacebookUtility(978): requestFriends()
02-18 16:14:40.239: I/Choreographer(978): Skipped 83 frames!  The application may be doing too much work on its main thread.
02-18 16:14:40.239: W/Trace(978): Unexpected value from nativeGetEnabledTags: 0
02-18 16:14:40.248: W/Trace(978): Unexpected value from nativeGetEnabledTags: 0
02-18 16:14:40.248: W/Trace(978): Unexpected value from nativeGetEnabledTags: 0
02-18 16:14:40.278: W/Trace(978): Unexpected value from nativeGetEnabledTags: 0
02-18 16:14:40.278: W/Trace(978): Unexpected value from nativeGetEnabledTags: 0
02-18 16:14:40.278: W/Trace(978): Unexpected value from nativeGetEnabledTags: 0
02-18 16:14:40.428: W/Trace(978): Unexpected value from nativeGetEnabledTags: 0
02-18 16:14:40.428: W/Trace(978): Unexpected value from nativeGetEnabledTags: 0
4

1 に答える 1

0

次のコードを変更する必要があります。うまくいかないことを願っています。

Calender cal = Calendar.getInstance();
cal.get(Calender.YEAR);
String yr = cal.gettime();
String query = "select name, birthday, uid, pic_square from user where uid in (select uid2 from friend where uid1=me())AND birthday_date like '"+ yr+ month+"%' ORDER BY birthday_date ASC";
于 2013-02-18T11:15:26.923 に答える