我正在编写一个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));
}
每当我运行我的应用程序时,我都没有得到任何数据,但是我的 3 个朋友在 2 月份过生日,但我没有得到那些生日。
我的 Logcat 说:-
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